comparison src/frame.c @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 95016f13131a
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
84 Lisp_Object Quse_backing_store; 84 Lisp_Object Quse_backing_store;
85 Lisp_Object Qborder_color; 85 Lisp_Object Qborder_color;
86 Lisp_Object Qborder_width; 86 Lisp_Object Qborder_width;
87 87
88 Lisp_Object Qframep, Qframe_live_p; 88 Lisp_Object Qframep, Qframe_live_p;
89 Lisp_Object Qframe_x_p, Qframe_tty_p;
90 Lisp_Object Qdelete_frame; 89 Lisp_Object Qdelete_frame;
91 90
92 Lisp_Object Qframe_title_format, Vframe_title_format; 91 Lisp_Object Qframe_title_format, Vframe_title_format;
93 Lisp_Object Qframe_icon_title_format, Vframe_icon_title_format; 92 Lisp_Object Qframe_icon_title_format, Vframe_icon_title_format;
94 93
120 119
121 EXFUN (Fset_frame_properties, 2); 120 EXFUN (Fset_frame_properties, 2);
122 121
123 122
124 static Lisp_Object 123 static Lisp_Object
125 mark_frame (Lisp_Object obj, void (*markobj) (Lisp_Object)) 124 mark_frame (Lisp_Object obj)
126 { 125 {
127 struct frame *f = XFRAME (obj); 126 struct frame *f = XFRAME (obj);
128 127
129 #define MARKED_SLOT(x) ((void) (markobj (f->x))); 128 #define MARKED_SLOT(x) mark_object (f->x)
130 #include "frameslots.h" 129 #include "frameslots.h"
131 130
132 mark_subwindow_cachels (f->subwindow_cachels, markobj); 131 mark_subwindow_cachels (f->subwindow_cachels);
133 132
134 if (FRAME_LIVE_P (f)) /* device is nil for a dead frame */ 133 if (FRAME_LIVE_P (f)) /* device is nil for a dead frame */
135 MAYBE_FRAMEMETH (f, mark_frame, (f, markobj)); 134 MAYBE_FRAMEMETH (f, mark_frame, (f));
136 135
137 return Qnil; 136 return Qnil;
138 } 137 }
139 138
140 static void 139 static void
160 struct frame); 159 struct frame);
161 160
162 static void 161 static void
163 nuke_all_frame_slots (struct frame *f) 162 nuke_all_frame_slots (struct frame *f)
164 { 163 {
165 #define MARKED_SLOT(x) f->x = Qnil; 164 #define MARKED_SLOT(x) f->x = Qnil
166 #include "frameslots.h" 165 #include "frameslots.h"
167 } 166 }
168 167
169 /* Allocate a new frame object and set all its fields to reasonable 168 /* Allocate a new frame object and set all its fields to reasonable
170 values. The root window is created but the minibuffer will be done 169 values. The root window is created but the minibuffer will be done
206 f->selected_window = root_window; 205 f->selected_window = root_window;
207 f->last_nonminibuf_window = root_window; 206 f->last_nonminibuf_window = root_window;
208 207
209 /* cache of subwindows visible on frame */ 208 /* cache of subwindows visible on frame */
210 f->subwindow_cachels = Dynarr_new (subwindow_cachel); 209 f->subwindow_cachels = Dynarr_new (subwindow_cachel);
210
211 /* associated exposure ignore list */
212 f->subwindow_exposures = 0;
213 f->subwindow_exposures_tail = 0;
211 214
212 /* Choose a buffer for the frame's root window. */ 215 /* Choose a buffer for the frame's root window. */
213 XWINDOW (root_window)->buffer = Qt; 216 XWINDOW (root_window)->buffer = Qt;
214 { 217 {
215 Lisp_Object buf; 218 Lisp_Object buf;
408 else 411 else
409 signal_simple_error ("Invalid value for `minibuffer'", minibuf); 412 signal_simple_error ("Invalid value for `minibuffer'", minibuf);
410 413
411 update_frame_window_mirror (f); 414 update_frame_window_mirror (f);
412 415
413 if (initialized) 416 if (initialized && !DEVICE_STREAM_P (d))
414 { 417 {
415 if (!NILP (f->minibuffer_window)) 418 if (!NILP (f->minibuffer_window))
416 reset_face_cachels (XWINDOW (f->minibuffer_window)); 419 reset_face_cachels (XWINDOW (f->minibuffer_window));
417 reset_face_cachels (XWINDOW (f->root_window)); 420 reset_face_cachels (XWINDOW (f->root_window));
418 } 421 }
3072 defsymbol (&Qmap_frame_hook, "map-frame-hook"); 3075 defsymbol (&Qmap_frame_hook, "map-frame-hook");
3073 defsymbol (&Qunmap_frame_hook, "unmap-frame-hook"); 3076 defsymbol (&Qunmap_frame_hook, "unmap-frame-hook");
3074 3077
3075 defsymbol (&Qframep, "framep"); 3078 defsymbol (&Qframep, "framep");
3076 defsymbol (&Qframe_live_p, "frame-live-p"); 3079 defsymbol (&Qframe_live_p, "frame-live-p");
3077 defsymbol (&Qframe_x_p, "frame-x-p");
3078 defsymbol (&Qframe_tty_p, "frame-tty-p");
3079 defsymbol (&Qdelete_frame, "delete-frame"); 3080 defsymbol (&Qdelete_frame, "delete-frame");
3080 defsymbol (&Qsynchronize_minibuffers, "synchronize-minibuffers"); 3081 defsymbol (&Qsynchronize_minibuffers, "synchronize-minibuffers");
3081 defsymbol (&Qbuffer_predicate, "buffer-predicate"); 3082 defsymbol (&Qbuffer_predicate, "buffer-predicate");
3082 defsymbol (&Qframe_being_created, "frame-being-created"); 3083 defsymbol (&Qframe_being_created, "frame-being-created");
3083 defsymbol (&Qmake_initial_minibuffer_frame, "make-initial-minibuffer-frame"); 3084 defsymbol (&Qmake_initial_minibuffer_frame, "make-initial-minibuffer-frame");
3289 DEFVAR_LISP ("frame-title-format", &Vframe_title_format /* 3290 DEFVAR_LISP ("frame-title-format", &Vframe_title_format /*
3290 Controls the title of the X window corresponding to the selected frame. 3291 Controls the title of the X window corresponding to the selected frame.
3291 This is the same format as `modeline-format' with the exception that 3292 This is the same format as `modeline-format' with the exception that
3292 %- is ignored. 3293 %- is ignored.
3293 */ ); 3294 */ );
3294 Vframe_title_format = Fpurecopy (build_string ("%S: %b")); 3295 Vframe_title_format = build_string ("%S: %b");
3295 3296
3296 DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /* 3297 DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /*
3297 Controls the title of the icon corresponding to the selected frame. 3298 Controls the title of the icon corresponding to the selected frame.
3298 See also the variable `frame-title-format'. 3299 See also the variable `frame-title-format'.
3299 */ ); 3300 */ );
3300 Vframe_icon_title_format = Fpurecopy (build_string ("%b")); 3301 Vframe_icon_title_format = build_string ("%b");
3301 3302
3302 DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /* 3303 DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /*
3303 The default name to assign to newly-created frames. 3304 The default name to assign to newly-created frames.
3304 This can be overridden by arguments to `make-frame'. 3305 This can be overridden by arguments to `make-frame'.
3305 This must be a string. 3306 This must be a string.
3306 */ ); 3307 */ );
3307 #ifndef INFODOCK 3308 #ifndef INFODOCK
3308 Vdefault_frame_name = Fpurecopy (build_string ("emacs")); 3309 Vdefault_frame_name = build_string ("emacs");
3309 #else 3310 #else
3310 Vdefault_frame_name = Fpurecopy (build_string ("InfoDock")); 3311 Vdefault_frame_name = build_string ("InfoDock");
3311 #endif 3312 #endif
3312 3313
3313 DEFVAR_LISP ("default-frame-plist", &Vdefault_frame_plist /* 3314 DEFVAR_LISP ("default-frame-plist", &Vdefault_frame_plist /*
3314 Plist of default values for frame creation, other than the first one. 3315 Plist of default values for frame creation, other than the first one.
3315 These may be set in your init file, like this: 3316 These may be set in your init file, like this: