comparison src/frame.c @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 8de8e3f6228a
children 576fb035e263
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
100 100
101 Lisp_Object Qvisible, Qiconic, Qinvisible, Qvisible_iconic, Qinvisible_iconic; 101 Lisp_Object Qvisible, Qiconic, Qinvisible, Qvisible_iconic, Qinvisible_iconic;
102 Lisp_Object Qnomini, Qvisible_nomini, Qiconic_nomini, Qinvisible_nomini; 102 Lisp_Object Qnomini, Qvisible_nomini, Qiconic_nomini, Qinvisible_nomini;
103 Lisp_Object Qvisible_iconic_nomini, Qinvisible_iconic_nomini; 103 Lisp_Object Qvisible_iconic_nomini, Qinvisible_iconic_nomini;
104 104
105 Lisp_Object Qset_specifier, Qset_glyph_image, Qset_face_property; 105 Lisp_Object Qset_specifier, Qset_face_property;
106 Lisp_Object Qface_property_instance; 106 Lisp_Object Qface_property_instance;
107 107
108 Lisp_Object Qframe_property_alias; 108 Lisp_Object Qframe_property_alias;
109 109
110 /* If this is non-nil, it is the frame that make-frame is currently 110 /* If this is non-nil, it is the frame that make-frame is currently
119 static struct display_line title_string_display_line; 119 static struct display_line title_string_display_line;
120 /* Used by generate_title_string. Global because they get used so much that 120 /* Used by generate_title_string. Global because they get used so much that
121 the dynamic allocation time adds up. */ 121 the dynamic allocation time adds up. */
122 static Emchar_dynarr *title_string_emchar_dynarr; 122 static Emchar_dynarr *title_string_emchar_dynarr;
123 123
124 EXFUN (Fset_frame_properties, 2);
125
126 124
127 static Lisp_Object 125 static Lisp_Object
128 mark_frame (Lisp_Object obj) 126 mark_frame (Lisp_Object obj)
129 { 127 {
130 struct frame *f = XFRAME (obj); 128 struct frame *f = XFRAME (obj);
131 129
132 #define MARKED_SLOT(x) mark_object (f->x) 130 #define MARKED_SLOT(x) mark_object (f->x)
133 #include "frameslots.h" 131 #include "frameslots.h"
134
135 mark_subwindow_cachels (f->subwindow_cachels);
136 132
137 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 */
138 MAYBE_FRAMEMETH (f, mark_frame, (f)); 134 MAYBE_FRAMEMETH (f, mark_frame, (f));
139 135
140 return Qnil; 136 return Qnil;
200 f->height = 10; 196 f->height = 10;
201 197
202 XWINDOW (root_window)->pixel_width = 10; 198 XWINDOW (root_window)->pixel_width = 10;
203 XWINDOW (root_window)->pixel_height = 9; 199 XWINDOW (root_window)->pixel_height = 9;
204 200
205 /* The size of the minibuffer window is now set in x_create_frame
206 in xfns.c. */
207
208 f->root_window = root_window; 201 f->root_window = root_window;
209 f->selected_window = root_window; 202 f->selected_window = root_window;
210 f->last_nonminibuf_window = root_window; 203 f->last_nonminibuf_window = root_window;
211 204
212 /* cache of subwindows visible on frame */ 205 /* cache of subwindows visible on frame */
213 f->subwindow_cachels = Dynarr_new (subwindow_cachel); 206 f->subwindow_instance_cache = make_weak_list (WEAK_LIST_SIMPLE);
214 207
215 /* associated exposure ignore list */ 208 /* associated exposure ignore list */
216 f->subwindow_exposures = 0; 209 f->subwindow_exposures = 0;
217 f->subwindow_exposures_tail = 0; 210 f->subwindow_exposures_tail = 0;
211
212 FRAME_SET_PAGENUMBER (f, 1);
218 213
219 /* Choose a buffer for the frame's root window. */ 214 /* Choose a buffer for the frame's root window. */
220 XWINDOW (root_window)->buffer = Qt; 215 XWINDOW (root_window)->buffer = Qt;
221 { 216 {
222 Lisp_Object buf; 217 Lisp_Object buf;
268 if (!NILP (mini_window) 263 if (!NILP (mini_window)
269 && !EQ (DEVICE_CONSOLE (XDEVICE (device)), 264 && !EQ (DEVICE_CONSOLE (XDEVICE (device)),
270 FRAME_CONSOLE (XFRAME (XWINDOW (mini_window)->frame)))) 265 FRAME_CONSOLE (XFRAME (XWINDOW (mini_window)->frame))))
271 error ("frame and minibuffer must be on the same console"); 266 error ("frame and minibuffer must be on the same console");
272 267
273 if (NILP (mini_window)) 268 /* Do not create a default minibuffer frame on printer devices. */
269 if (NILP (mini_window)
270 && DEVICE_DISPLAY_P (XDEVICE (FRAME_DEVICE (f))))
274 { 271 {
275 struct console *con = XCONSOLE (FRAME_CONSOLE (f)); 272 struct console *con = XCONSOLE (FRAME_CONSOLE (f));
276 /* Use default-minibuffer-frame if possible. */ 273 /* Use default-minibuffer-frame if possible. */
277 if (!FRAMEP (con->default_minibuffer_frame) 274 if (!FRAMEP (con->default_minibuffer_frame)
278 || ! FRAME_LIVE_P (XFRAME (con->default_minibuffer_frame))) 275 || ! FRAME_LIVE_P (XFRAME (con->default_minibuffer_frame)))
283 } 280 }
284 mini_window = XFRAME (con->default_minibuffer_frame)->minibuffer_window; 281 mini_window = XFRAME (con->default_minibuffer_frame)->minibuffer_window;
285 } 282 }
286 283
287 /* Install the chosen minibuffer window, with proper buffer. */ 284 /* Install the chosen minibuffer window, with proper buffer. */
288 store_minibuf_frame_prop (f, mini_window); 285 if (!NILP (mini_window))
289 Fset_window_buffer (mini_window, Vminibuffer_zero, Qt); 286 {
287 store_minibuf_frame_prop (f, mini_window);
288 Fset_window_buffer (mini_window, Vminibuffer_zero, Qt);
289 }
290 else
291 f->minibuffer_window = Qnil;
290 } 292 }
291 293
292 /* Make a frame containing only a minibuffer window. */ 294 /* Make a frame containing only a minibuffer window. */
293 295
294 static void 296 static void
378 else if (STRINGP (Vdefault_frame_name)) 380 else if (STRINGP (Vdefault_frame_name))
379 name = Vdefault_frame_name; 381 name = Vdefault_frame_name;
380 else 382 else
381 name = build_string ("emacs"); 383 name = build_string ("emacs");
382 384
383 if (!NILP (Fstring_match (make_string ((CONST Bufbyte *) "\\.", 2), name, 385 if (!NILP (Fstring_match (make_string ((const Bufbyte *) "\\.", 2), name,
384 Qnil, Qnil))) 386 Qnil, Qnil)))
385 signal_simple_error (". not allowed in frame names", name); 387 signal_simple_error (". not allowed in frame names", name);
386 388
387 f = allocate_frame_core (device); 389 f = allocate_frame_core (device);
388 XSETFRAME (frame, f); 390 XSETFRAME (frame, f);
464 things. */ 466 things. */
465 init_frame_toolbars (f); 467 init_frame_toolbars (f);
466 #endif 468 #endif
467 reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); 469 reset_face_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
468 reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f))); 470 reset_glyph_cachels (XWINDOW (FRAME_SELECTED_WINDOW (f)));
469 reset_subwindow_cachels (f); 471
470 change_frame_size (f, f->height, f->width, 0); 472 change_frame_size (f, f->height, f->width, 0);
471
472 } 473 }
473 474
474 MAYBE_FRAMEMETH (f, init_frame_2, (f, props)); 475 MAYBE_FRAMEMETH (f, init_frame_2, (f, props));
475 Fset_frame_properties (frame, props); 476 Fset_frame_properties (frame, props);
476 MAYBE_FRAMEMETH (f, init_frame_3, (f)); 477 MAYBE_FRAMEMETH (f, init_frame_3, (f));
477
478 /* now initialise the gutters, this won't change the frame size
479 so is ok here. */
480 if (!DEVICE_STREAM_P (d))
481 init_frame_gutters (f);
482 478
483 /* Hallelujah, praise the lord. */ 479 /* Hallelujah, praise the lord. */
484 f->init_finished = 1; 480 f->init_finished = 1;
485 481
486 /* If this is the first frame on the device, make it the selected one. */ 482 /* If this is the first frame on the device, make it the selected one. */
502 /* #### all this calling of frame methods at various odd times 498 /* #### all this calling of frame methods at various odd times
503 is somewhat of a mess. It's necessary to do it this way due 499 is somewhat of a mess. It's necessary to do it this way due
504 to strange console-type-specific things that need to be done. */ 500 to strange console-type-specific things that need to be done. */
505 MAYBE_FRAMEMETH (f, after_init_frame, (f, first_frame_on_device, 501 MAYBE_FRAMEMETH (f, after_init_frame, (f, first_frame_on_device,
506 first_frame_on_console)); 502 first_frame_on_console));
503
504 if (!DEVICE_STREAM_P (d))
505 {
506 /* Now initialise the gutters. This won't change the frame size,
507 but is needed as input to the layout that change_frame_size
508 will eventually do. Unfortunately gutter sizing code relies
509 on the frame in question being visible so we can't do this
510 earlier. */
511 init_frame_gutters (f);
512
513 change_frame_size (f, f->height, f->width, 0);
514 }
507 515
508 if (first_frame_on_device) 516 if (first_frame_on_device)
509 { 517 {
510 if (first_frame_on_console) 518 if (first_frame_on_console)
511 va_run_hook_with_args (Qcreate_console_hook, 1, DEVICE_CONSOLE (d)); 519 va_run_hook_with_args (Qcreate_console_hook, 1, DEVICE_CONSOLE (d));
903 { 911 {
904 assert (XFRAME (WINDOW_FRAME (XWINDOW (window))) == f); 912 assert (XFRAME (WINDOW_FRAME (XWINDOW (window))) == f);
905 f->selected_window = window; 913 f->selected_window = window;
906 if (!MINI_WINDOW_P (XWINDOW (window)) || FRAME_MINIBUF_ONLY_P (f)) 914 if (!MINI_WINDOW_P (XWINDOW (window)) || FRAME_MINIBUF_ONLY_P (f))
907 { 915 {
908 #ifdef HAVE_TOOLBARS
909 if (!EQ (f->last_nonminibuf_window, window)) 916 if (!EQ (f->last_nonminibuf_window, window))
910 { 917 {
918 #ifdef HAVE_TOOLBARS
911 MARK_TOOLBAR_CHANGED; 919 MARK_TOOLBAR_CHANGED;
920 #endif
912 MARK_GUTTER_CHANGED; 921 MARK_GUTTER_CHANGED;
913 } 922 }
914 #endif
915 f->last_nonminibuf_window = window; 923 f->last_nonminibuf_window = window;
916 } 924 }
917 } 925 }
918 926
919 DEFUN ("set-frame-selected-window", Fset_frame_selected_window, 2, 2, 0, /* 927 DEFUN ("set-frame-selected-window", Fset_frame_selected_window, 2, 2, 0, /*
1023 1031
1024 return 1; 1032 return 1;
1025 } 1033 }
1026 1034
1027 int 1035 int
1028 device_matches_console_spec (Lisp_Object frame, Lisp_Object device, 1036 device_matches_console_spec (Lisp_Object device, Lisp_Object console)
1029 Lisp_Object console)
1030 { 1037 {
1031 if (EQ (console, Qwindow_system)) 1038 if (EQ (console, Qwindow_system))
1032 return DEVICE_WIN_P (XDEVICE (device)); 1039 return DEVICE_WIN_P (XDEVICE (device));
1033 if (NILP (console))
1034 console = (DEVICE_CONSOLE (XDEVICE (FRAME_DEVICE (XFRAME (frame)))));
1035 if (DEVICEP (console)) 1040 if (DEVICEP (console))
1036 return EQ (device, console); 1041 return EQ (device, console);
1037 if (CONSOLEP (console)) 1042 if (CONSOLEP (console))
1038 return EQ (DEVICE_CONSOLE (XDEVICE (device)), console); 1043 return EQ (DEVICE_CONSOLE (XDEVICE (device)), console);
1039 if (valid_console_type_p (console)) 1044 if (valid_console_type_p (console))
1043 1048
1044 /* Return the next frame in the frame list after FRAME. 1049 /* Return the next frame in the frame list after FRAME.
1045 FRAMETYPE and CONSOLE control which frames and devices 1050 FRAMETYPE and CONSOLE control which frames and devices
1046 are considered; see `next-frame'. */ 1051 are considered; see `next-frame'. */
1047 1052
1048 static Lisp_Object 1053 Lisp_Object
1049 next_frame_internal (Lisp_Object frame, Lisp_Object frametype, 1054 next_frame (Lisp_Object frame, Lisp_Object frametype, Lisp_Object console)
1050 Lisp_Object console, int called_from_delete_device) 1055 {
1051 { 1056 Lisp_Object first = Qnil;
1057 Lisp_Object devcons, concons;
1052 int passed = 0; 1058 int passed = 0;
1053 int started_over = 0; 1059
1054
1055 /* If this frame is dead, it won't be in frame_list, and we'll loop
1056 forever. Forestall that. */
1057 CHECK_LIVE_FRAME (frame); 1060 CHECK_LIVE_FRAME (frame);
1058 1061
1059 while (1) 1062 DEVICE_LOOP_NO_BREAK (devcons, concons)
1060 { 1063 {
1061 Lisp_Object devcons, concons; 1064 Lisp_Object device = XCAR (devcons);
1062 1065 Lisp_Object frmcons;
1063 DEVICE_LOOP_NO_BREAK (devcons, concons) 1066
1067 if (!device_matches_console_spec (device, console))
1064 { 1068 {
1065 Lisp_Object device = XCAR (devcons); 1069 if (EQ (device, FRAME_DEVICE (XFRAME (frame))))
1066 Lisp_Object frmcons; 1070 passed = 1;
1067 1071 continue;
1068 if (!device_matches_console_spec (frame, device, console)) 1072 }
1069 continue; 1073
1070 1074 DEVICE_FRAME_LOOP (frmcons, XDEVICE (device))
1071 DEVICE_FRAME_LOOP (frmcons, XDEVICE (device)) 1075 {
1076 Lisp_Object f = XCAR (frmcons);
1077
1078 if (passed)
1072 { 1079 {
1073 Lisp_Object f = XCAR (frmcons); 1080 if (frame_matches_frametype (f, frametype))
1074 if (passed) 1081 return f;
1082 }
1083 else
1084 {
1085 if (EQ (frame, f))
1075 { 1086 {
1076 /* #### Doing this here is bad and is now 1087 passed = 1;
1077 unnecessary. The real bug was that f->iconified
1078 was never, ever updated unless a user explicitly
1079 called frame-iconified-p. That has now been
1080 fixed. With this change removed all of the other
1081 changes made to support this routine having the
1082 called_from_delete_device arg could be removed.
1083 But it is too close to release to do that now. */
1084 #if 0
1085 /* Make sure the visibility and iconified flags are
1086 up-to-date unless we're being deleted. */
1087 if (!called_from_delete_device)
1088 {
1089 Fframe_iconified_p (f);
1090 Fframe_visible_p (f);
1091 }
1092 #endif
1093
1094 /* Decide whether this frame is eligible to be returned. */
1095
1096 /* If we've looped all the way around without finding any
1097 eligible frames, return the original frame. */
1098 if (EQ (f, frame))
1099 return f;
1100
1101 if (frame_matches_frametype (f, frametype))
1102 return f;
1103 } 1088 }
1104 1089 else
1105 if (EQ (frame, f)) 1090 {
1106 passed++; 1091 if (NILP (first) && frame_matches_frametype (f, frametype))
1092 first = f;
1093 }
1107 } 1094 }
1108 } 1095 }
1109 /* We hit the end of the list, and need to start over again. */ 1096 }
1110 if (started_over) 1097
1111 return Qnil; 1098 if (NILP (first))
1112 started_over++; 1099 /* We went through the whole frame list without finding a single
1113 } 1100 acceptable frame. Return the original frame. */
1114 } 1101 return frame;
1115 1102 else
1116 Lisp_Object 1103 /* There were no acceptable frames in the list after FRAME; otherwise,
1117 next_frame (Lisp_Object frame, Lisp_Object frametype, Lisp_Object console) 1104 we would have returned directly from the loop. Since FIRST is the last
1118 { 1105 acceptable frame in the list, return it. */
1119 return next_frame_internal (frame, frametype, console, 0); 1106 return first;
1120 } 1107 }
1121 1108
1122 /* Return the previous frame in the frame list before FRAME. 1109 /* Return the previous frame in the frame list before FRAME.
1123 FRAMETYPE and CONSOLE control which frames and devices 1110 FRAMETYPE and CONSOLE control which frames and devices
1124 are considered; see `next-frame'. */ 1111 are considered; see `next-frame'. */
1125 1112
1126 Lisp_Object 1113 Lisp_Object
1127 prev_frame (Lisp_Object frame, Lisp_Object frametype, Lisp_Object console) 1114 previous_frame (Lisp_Object frame, Lisp_Object frametype, Lisp_Object console)
1128 { 1115 {
1129 Lisp_Object devcons, concons; 1116 Lisp_Object devcons, concons;
1130 Lisp_Object prev; 1117 Lisp_Object last = Qnil;
1131 1118
1132 /* If this frame is dead, it won't be in frame_list, and we'll loop
1133 forever. Forestall that. */
1134 CHECK_LIVE_FRAME (frame); 1119 CHECK_LIVE_FRAME (frame);
1135 1120
1136 prev = Qnil;
1137 DEVICE_LOOP_NO_BREAK (devcons, concons) 1121 DEVICE_LOOP_NO_BREAK (devcons, concons)
1138 { 1122 {
1139 Lisp_Object device = XCAR (devcons); 1123 Lisp_Object device = XCAR (devcons);
1140 Lisp_Object frmcons; 1124 Lisp_Object frmcons;
1141 1125
1142 if (!device_matches_console_spec (frame, device, console)) 1126 if (!device_matches_console_spec (device, console))
1143 continue; 1127 {
1128 if (EQ (device, FRAME_DEVICE (XFRAME (frame)))
1129 && !NILP (last))
1130 return last;
1131 continue;
1132 }
1144 1133
1145 DEVICE_FRAME_LOOP (frmcons, XDEVICE (device)) 1134 DEVICE_FRAME_LOOP (frmcons, XDEVICE (device))
1146 { 1135 {
1147 Lisp_Object f = XCAR (frmcons); 1136 Lisp_Object f = XCAR (frmcons);
1148 1137
1149 if (EQ (frame, f) && !NILP (prev)) 1138 if (EQ (frame, f))
1150 return prev; 1139 {
1151 1140 if (!NILP (last))
1152 /* Decide whether this frame is eligible to be returned, 1141 return last;
1153 according to frametype. */ 1142 }
1154 1143 else
1155 if (frame_matches_frametype (f, frametype)) 1144 {
1156 prev = f; 1145 if (frame_matches_frametype (f, frametype))
1157 1146 last = f;
1147 }
1158 } 1148 }
1159 } 1149 }
1160 1150
1161 /* We've scanned the entire list. */ 1151 if (NILP (last))
1162 if (NILP (prev))
1163 /* We went through the whole frame list without finding a single 1152 /* We went through the whole frame list without finding a single
1164 acceptable frame. Return the original frame. */ 1153 acceptable frame. Return the original frame. */
1165 return frame; 1154 return frame;
1166 else 1155 else
1167 /* There were no acceptable frames in the list before FRAME; otherwise, 1156 /* There were no acceptable frames in the list before FRAME; otherwise,
1168 we would have returned directly from the loop. Since PREV is the last 1157 we would have returned directly from the loop. Since LAST is the last
1169 acceptable frame in the list, return it. */ 1158 acceptable frame in the list, return it. */
1170 return prev; 1159 return last;
1171 } 1160 }
1172 1161
1173 DEFUN ("next-frame", Fnext_frame, 0, 3, 0, /* 1162 DEFUN ("next-frame", Fnext_frame, 0, 3, 0, /*
1174 Return the next frame of the right type in the frame list after FRAME. 1163 Return the next frame of the right type in the frame list after FRAME.
1175 FRAMETYPE controls which frames are eligible to be returned; all 1164 FRAMETYPE controls which frames are eligible to be returned; all
1230 */ 1219 */
1231 (frame, frametype, console)) 1220 (frame, frametype, console))
1232 { 1221 {
1233 XSETFRAME (frame, decode_frame (frame)); 1222 XSETFRAME (frame, decode_frame (frame));
1234 1223
1235 return prev_frame (frame, frametype, console); 1224 return previous_frame (frame, frametype, console);
1236 } 1225 }
1237 1226
1238 /* Return any frame for which PREDICATE is non-zero, or return Qnil 1227 /* Return any frame for which PREDICATE is non-zero, or return Qnil
1239 if there aren't any. */ 1228 if there aren't any. */
1240 1229
1262 /* Return 1 if it is ok to delete frame F; 1251 /* Return 1 if it is ok to delete frame F;
1263 0 if all frames aside from F are invisible. 1252 0 if all frames aside from F are invisible.
1264 (Exception: if F is a stream frame, it's OK to delete if 1253 (Exception: if F is a stream frame, it's OK to delete if
1265 any other frames exist.) */ 1254 any other frames exist.) */
1266 1255
1267 static int 1256 int
1268 other_visible_frames_internal (struct frame *f, int called_from_delete_device) 1257 other_visible_frames (struct frame *f)
1269 { 1258 {
1270 Lisp_Object frame; 1259 Lisp_Object frame;
1271 1260
1272 XSETFRAME (frame, f); 1261 XSETFRAME (frame, f);
1273 if (FRAME_STREAM_P (f)) 1262 if (FRAME_STREAM_P (f))
1274 return !EQ (frame, next_frame_internal (frame, Qt, Qt, 1263 return !EQ (frame, next_frame (frame, Qt, Qt));
1275 called_from_delete_device)); 1264 return !EQ (frame, next_frame (frame, Qvisible_iconic_nomini, Qt));
1276 return !EQ (frame, next_frame_internal (frame, Qvisible_iconic_nomini, Qt,
1277 called_from_delete_device));
1278 }
1279
1280 int
1281 other_visible_frames (struct frame *f)
1282 {
1283 return other_visible_frames_internal (f, 0);
1284 } 1265 }
1285 1266
1286 /* Delete frame F. 1267 /* Delete frame F.
1287 1268
1288 If FORCE is non-zero, allow deletion of the only frame. 1269 If FORCE is non-zero, allow deletion of the only frame.
1341 only frame. However, this would let people shoot themselves by 1322 only frame. However, this would let people shoot themselves by
1342 deleting all frames which were either visible or iconified and thus 1323 deleting all frames which were either visible or iconified and thus
1343 losing any way of communicating with the still running XEmacs process. 1324 losing any way of communicating with the still running XEmacs process.
1344 So we put it back. */ 1325 So we put it back. */
1345 if (!force && !allow_deletion_of_last_visible_frame && 1326 if (!force && !allow_deletion_of_last_visible_frame &&
1346 !other_visible_frames_internal (f, called_from_delete_device)) 1327 !other_visible_frames (f))
1347 error ("Attempt to delete the sole visible or iconified frame"); 1328 error ("Attempt to delete the sole visible or iconified frame");
1348 1329
1349 /* Does this frame have a minibuffer, and is it the surrogate 1330 /* Does this frame have a minibuffer, and is it the surrogate
1350 minibuffer for any other frame? */ 1331 minibuffer for any other frame? */
1351 if (FRAME_HAS_MINIBUF_P (f)) 1332 if (FRAME_HAS_MINIBUF_P (f))
1467 Otherwise, find another visible frame; if none, just take any frame. 1448 Otherwise, find another visible frame; if none, just take any frame.
1468 First try the same device, then the same console. */ 1449 First try the same device, then the same console. */
1469 1450
1470 next = DEVMETH_OR_GIVEN (d, get_frame_parent, (f), Qnil); 1451 next = DEVMETH_OR_GIVEN (d, get_frame_parent, (f), Qnil);
1471 if (NILP (next) || EQ (next, frame) || ! FRAME_LIVE_P (XFRAME (next))) 1452 if (NILP (next) || EQ (next, frame) || ! FRAME_LIVE_P (XFRAME (next)))
1472 next = next_frame_internal (frame, Qvisible, device, 1453 next = next_frame (frame, Qvisible, device);
1473 called_from_delete_device);
1474 if (NILP (next) || EQ (next, frame)) 1454 if (NILP (next) || EQ (next, frame))
1475 next = next_frame_internal (frame, Qvisible, console, 1455 next = next_frame (frame, Qvisible, console);
1476 called_from_delete_device);
1477 if (NILP (next) || EQ (next, frame)) 1456 if (NILP (next) || EQ (next, frame))
1478 next = next_frame_internal (frame, Qvisible, Qt, 1457 next = next_frame (frame, Qvisible, Qt);
1479 called_from_delete_device);
1480 if (NILP (next) || EQ (next, frame)) 1458 if (NILP (next) || EQ (next, frame))
1481 next = next_frame_internal (frame, Qt, device, 1459 next = next_frame (frame, Qt, device);
1482 called_from_delete_device);
1483 if (NILP (next) || EQ (next, frame)) 1460 if (NILP (next) || EQ (next, frame))
1484 next = next_frame_internal (frame, Qt, console, 1461 next = next_frame (frame, Qt, console);
1485 called_from_delete_device);
1486 if (NILP (next) || EQ (next, frame)) 1462 if (NILP (next) || EQ (next, frame))
1487 next = next_frame_internal (frame, Qt, Qt, called_from_delete_device); 1463 next = next_frame (frame, Qt, Qt);
1488 1464
1489 /* if we haven't found another frame at this point 1465 /* if we haven't found another frame at this point
1490 then there aren't any. */ 1466 then there aren't any. */
1491 if (NILP (next) || EQ (next, frame)) 1467 if (NILP (next) || EQ (next, frame))
1492 ; 1468 ;
1504 * device then we still need to change DEVICE_SELECTED_FRAME(d) 1480 * device then we still need to change DEVICE_SELECTED_FRAME(d)
1505 * to a live frame, if there are any left on this device. 1481 * to a live frame, if there are any left on this device.
1506 */ 1482 */
1507 if (!EQ (device, FRAME_DEVICE(XFRAME(next)))) 1483 if (!EQ (device, FRAME_DEVICE(XFRAME(next))))
1508 { 1484 {
1509 Lisp_Object next_f = 1485 Lisp_Object next_f = next_frame (frame, Qt, device);
1510 next_frame_internal (frame, Qt, device,
1511 called_from_delete_device);
1512 if (NILP (next_f) || EQ (next_f, frame)) 1486 if (NILP (next_f) || EQ (next_f, frame))
1513 set_device_selected_frame (d, Qnil); 1487 set_device_selected_frame (d, Qnil);
1514 else 1488 else
1515 set_device_selected_frame (d, next_f); 1489 set_device_selected_frame (d, next_f);
1516 } 1490 }
1544 #endif 1518 #endif
1545 #ifdef HAVE_TOOLBARS 1519 #ifdef HAVE_TOOLBARS
1546 free_frame_toolbars (f); 1520 free_frame_toolbars (f);
1547 #endif 1521 #endif
1548 free_frame_gutters (f); 1522 free_frame_gutters (f);
1523 /* Unfortunately deleting the frame will also delete the parent of
1524 all of the subwindow instances current on the frame. I think this
1525 can lead to bad things when trying to finalize the
1526 instances. Thus we loop over all instance caches calling the
1527 finalize method for each instance. */
1528 free_frame_subwindow_instances (f);
1549 1529
1550 /* This must be done before the window and window_mirror structures 1530 /* This must be done before the window and window_mirror structures
1551 are freed. The scrollbar information is attached to them. */ 1531 are freed. The scrollbar information is attached to them. */
1552 MAYBE_FRAMEMETH (f, delete_frame, (f)); 1532 MAYBE_FRAMEMETH (f, delete_frame, (f));
1553 1533
1555 remove the reference to them. */ 1535 remove the reference to them. */
1556 delete_all_subwindows (XWINDOW (f->root_window)); 1536 delete_all_subwindows (XWINDOW (f->root_window));
1557 f->root_window = Qnil; 1537 f->root_window = Qnil;
1558 1538
1559 /* clear out the cached glyph information */ 1539 /* clear out the cached glyph information */
1560 if (f->subwindow_cachels) 1540 f->subwindow_instance_cache = Qnil;
1561 {
1562 Dynarr_free (f->subwindow_cachels);
1563 f->subwindow_cachels = 0;
1564 }
1565 1541
1566 /* Remove the frame now from the list. This way, any events generated 1542 /* Remove the frame now from the list. This way, any events generated
1567 on this frame by the maneuvers below will disperse themselves. */ 1543 on this frame by the maneuvers below will disperse themselves. */
1568 1544
1569 /* This used to be Fdelq(), but that will cause a seg fault if the 1545 /* This used to be Fdelq(), but that will cause a seg fault if the
1733 return 0; 1709 return 0;
1734 } 1710 }
1735 1711
1736 DEFUN ("mouse-pixel-position", Fmouse_pixel_position, 0, 1, 0, /* 1712 DEFUN ("mouse-pixel-position", Fmouse_pixel_position, 0, 1, 0, /*
1737 Return a list (WINDOW X . Y) giving the current mouse window and position. 1713 Return a list (WINDOW X . Y) giving the current mouse window and position.
1738 The position is given in pixel units, where (0, 0) is the upper-left corner. 1714 The position is given in pixel units, where (0, 0) is the upper-left corner
1715 of the window.
1739 1716
1740 When the cursor is not over a window, the return value is a list (nil nil). 1717 When the cursor is not over a window, the return value is a list (nil nil).
1741 1718
1742 DEVICE specifies the device on which to read the mouse position, and 1719 DEVICE specifies the device on which to read the mouse position, and
1743 defaults to the selected device. If the device is a mouseless terminal 1720 defaults to the selected device. If the device is a mouseless terminal
1744 or Emacs hasn't been programmed to read its mouse position, it returns 1721 or XEmacs hasn't been programmed to read its mouse position, it returns
1745 the device's selected window for WINDOW and nil for X and Y. 1722 the device's selected window for WINDOW and nil for X and Y.
1746 */ 1723 */
1747 (device)) 1724 (device))
1748 { 1725 {
1749 struct device *d = decode_device (device); 1726 struct device *d = decode_device (device);
2085 2062
2086 MAYBE_FRAMEMETH (f, lower_frame, (f)); 2063 MAYBE_FRAMEMETH (f, lower_frame, (f));
2087 return Qnil; 2064 return Qnil;
2088 } 2065 }
2089 2066
2067
2068 DEFUN ("disable-frame", Fdisable_frame, 1, 1, 0, /*
2069 Disable frame FRAME, so that it cannot have the focus or receive user input.
2070 This is normally used during modal dialog boxes.
2071 WARNING: Be very careful not to wedge XEmacs!
2072 Use an `unwind-protect' that re-enables the frame to avoid this.
2073 */
2074 (frame))
2075 {
2076 struct frame *f = decode_frame (frame);
2077
2078 f->disabled = 1;
2079 MAYBE_FRAMEMETH (f, disable_frame, (f));
2080 return Qnil;
2081 }
2082
2083 DEFUN ("enable-frame", Fenable_frame, 1, 1, 0, /*
2084 Enable frame FRAME, so that it can have the focus and receive user input.
2085 Frames are normally enabled, unless explicitly disabled using `disable-frame'.
2086 */
2087 (frame))
2088 {
2089 struct frame *f = decode_frame (frame);
2090 f->disabled = 0;
2091 MAYBE_FRAMEMETH (f, enable_frame, (f));
2092 return Qnil;
2093 }
2094
2090 /* Ben thinks there is no need for `redirect-frame-focus' or `frame-focus', 2095 /* Ben thinks there is no need for `redirect-frame-focus' or `frame-focus',
2091 crockish FSFmacs functions. See summary on focus in event-stream.c. */ 2096 crockish FSFmacs functions. See summary on focus in event-stream.c. */
2097
2098 DEFUN ("print-job-page-number", Fprint_job_page_number, 1, 1, 0, /*
2099 Return current page number for the print job FRAME.
2100 */
2101 (frame))
2102 {
2103 CHECK_PRINTER_FRAME (frame);
2104 return make_int (FRAME_PAGENUMBER (XFRAME (frame)));
2105 }
2106
2107 DEFUN ("print-job-eject-page", Fprint_job_eject_page, 1, 1, 0, /*
2108 Eject page in the print job FRAME.
2109 */
2110 (frame))
2111 {
2112 struct frame *f;
2113
2114 CHECK_PRINTER_FRAME (frame);
2115 f = XFRAME (frame);
2116 FRAMEMETH (f, eject_page, (f));
2117 FRAME_SET_PAGENUMBER (f, 1 + FRAME_PAGENUMBER (f));
2118 f->clear = 1;
2119
2120 return Qnil;
2121 }
2092 2122
2093 2123
2094 /***************************************************************************/ 2124 /***************************************************************************/
2095 /* frame properties */ 2125 /* frame properties */
2096 /***************************************************************************/ 2126 /***************************************************************************/
2230 2260
2231 width Width of the frame, in characters. 2261 width Width of the frame, in characters.
2232 2262
2233 minibuffer Gives the minibuffer behavior for this frame. Either 2263 minibuffer Gives the minibuffer behavior for this frame. Either
2234 t (frame has its own minibuffer), `only' (frame is 2264 t (frame has its own minibuffer), `only' (frame is
2235 a minibuffer-only frame), or a window (frame uses that 2265 a minibuffer-only frame), `none' (frame has no minibuffer)
2236 window, which is on another frame, as the minibuffer). 2266 or a window (frame uses that window, which is on another
2267 frame, as the minibuffer).
2237 2268
2238 unsplittable If non-nil, frame cannot be split by `display-buffer'. 2269 unsplittable If non-nil, frame cannot be split by `display-buffer'.
2239 2270
2240 current-display-table, menubar-visible-p, left-margin-width, 2271 current-display-table, menubar-visible-p, left-margin-width,
2241 right-margin-width, minimum-line-ascent, minimum-line-descent, 2272 right-margin-width, minimum-line-ascent, minimum-line-descent,
2245 bottom-toolbar-height, left-toolbar-width, right-toolbar-width, 2276 bottom-toolbar-height, left-toolbar-width, right-toolbar-width,
2246 default-toolbar-visible-p, top-toolbar-visible-p, bottom-toolbar-visible-p, 2277 default-toolbar-visible-p, top-toolbar-visible-p, bottom-toolbar-visible-p,
2247 left-toolbar-visible-p, right-toolbar-visible-p, toolbar-buttons-captioned-p, 2278 left-toolbar-visible-p, right-toolbar-visible-p, toolbar-buttons-captioned-p,
2248 top-toolbar-border-width, bottom-toolbar-border-width, 2279 top-toolbar-border-width, bottom-toolbar-border-width,
2249 left-toolbar-border-width, right-toolbar-border-width, 2280 left-toolbar-border-width, right-toolbar-border-width,
2250 modeline-shadow-thickness, has-modeline-p 2281 modeline-shadow-thickness, has-modeline-p,
2282 default-gutter, top-gutter, bottom-gutter, left-gutter, right-gutter,
2283 default-gutter-height, default-gutter-width, top-gutter-height,
2284 bottom-gutter-height, left-gutter-width, right-gutter-width,
2285 default-gutter-visible-p, top-gutter-visible-p, bottom-gutter-visible-p,
2286 left-gutter-visible-p, right-gutter-visible-p, top-gutter-border-width,
2287 bottom-gutter-border-width, left-gutter-border-width, right-gutter-border-width,
2251 [Giving the name of any built-in specifier variable is 2288 [Giving the name of any built-in specifier variable is
2252 equivalent to calling `set-specifier' on the specifier, 2289 equivalent to calling `set-specifier' on the specifier,
2253 with a locale of FRAME. Giving the name to `frame-property' 2290 with a locale of FRAME. Giving the name to `frame-property'
2254 calls `specifier-instance' on the specifier.] 2291 calls `specifier-instance' on the specifier.]
2255 2292
2849 + FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f) 2886 + FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH (f)
2850 + 2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f) 2887 + 2 * FRAME_THEORETICAL_RIGHT_TOOLBAR_BORDER_WIDTH (f)
2851 - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) 2888 - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f)
2852 - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f); 2889 - 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f);
2853 2890
2854 new_pixwidth += 2 * f->internal_border_width;
2855
2856 /* Adjust the width for the end glyph which may be a different width 2891 /* Adjust the width for the end glyph which may be a different width
2857 than the default character width. */ 2892 than the default character width. */
2858 { 2893 {
2859 int adjustment, trunc_width, cont_width; 2894 int adjustment, trunc_width, cont_width;
2860 2895
2872 if (!new_pixheight && !new_pixwidth) 2907 if (!new_pixheight && !new_pixwidth)
2873 return; 2908 return;
2874 2909
2875 if (new_pixheight) 2910 if (new_pixheight)
2876 { 2911 {
2877 XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top = FRAME_TOP_BORDER_END (f); 2912 /* Adjust for gutters here so that we always get set
2913 properly. */
2914 new_pixheight -=
2915 (FRAME_TOP_GUTTER_BOUNDS (f)
2916 + FRAME_BOTTOM_GUTTER_BOUNDS (f));
2917
2918 XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top
2919 = FRAME_TOP_BORDER_END (f) + FRAME_TOP_GUTTER_BOUNDS (f);
2878 2920
2879 if (FRAME_HAS_MINIBUF_P (f) 2921 if (FRAME_HAS_MINIBUF_P (f)
2880 && ! FRAME_MINIBUF_ONLY_P (f)) 2922 && ! FRAME_MINIBUF_ONLY_P (f))
2881 /* Frame has both root and minibuffer. */ 2923 /* Frame has both root and minibuffer. */
2882 { 2924 {
2898 set_window_pixheight (FRAME_ROOT_WINDOW (f), 2940 set_window_pixheight (FRAME_ROOT_WINDOW (f),
2899 /* - font_height for minibuffer */ 2941 /* - font_height for minibuffer */
2900 new_pixheight - minibuf_height, 0); 2942 new_pixheight - minibuf_height, 0);
2901 2943
2902 XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top = 2944 XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_top =
2903 new_pixheight - minibuf_height + FRAME_TOP_BORDER_END (f); 2945 FRAME_TOP_BORDER_END (f) +
2946 FRAME_TOP_GUTTER_BOUNDS (f) +
2947 FRAME_BOTTOM_GUTTER_BOUNDS (f) +
2948 new_pixheight - minibuf_height;
2904 2949
2905 set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0); 2950 set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0);
2906 } 2951 }
2907 else 2952 else
2908 /* Frame has just one top-level window. */ 2953 /* Frame has just one top-level window. */
2913 f->pixheight = newheight; 2958 f->pixheight = newheight;
2914 } 2959 }
2915 2960
2916 if (new_pixwidth) 2961 if (new_pixwidth)
2917 { 2962 {
2918 XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = FRAME_LEFT_BORDER_END (f); 2963 /* Adjust for gutters here so that we always get set
2964 properly. */
2965 new_pixwidth -=
2966 (FRAME_LEFT_GUTTER_BOUNDS (f)
2967 + FRAME_RIGHT_GUTTER_BOUNDS (f));
2968
2969 XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left =
2970 FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f);
2919 set_window_pixwidth (FRAME_ROOT_WINDOW (f), new_pixwidth, 0); 2971 set_window_pixwidth (FRAME_ROOT_WINDOW (f), new_pixwidth, 0);
2920 2972
2921 if (FRAME_HAS_MINIBUF_P (f)) 2973 if (FRAME_HAS_MINIBUF_P (f))
2922 { 2974 {
2923 XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_left = 2975 XWINDOW (FRAME_MINIBUF_WINDOW (f))->pixel_left =
2924 FRAME_LEFT_BORDER_END (f); 2976 FRAME_LEFT_BORDER_END (f) + FRAME_LEFT_GUTTER_BOUNDS (f);
2925 set_window_pixwidth (FRAME_MINIBUF_WINDOW (f), new_pixwidth, 0); 2977 set_window_pixwidth (FRAME_MINIBUF_WINDOW (f), new_pixwidth, 0);
2926 } 2978 }
2927 2979
2928 FRAME_WIDTH (f) = newwidth; 2980 FRAME_WIDTH (f) = newwidth;
2929 if (FRAME_TTY_P (f)) 2981 if (FRAME_TTY_P (f))
2938 FRAME_CHARWIDTH (f) = FRAME_WIDTH (f); 2990 FRAME_CHARWIDTH (f) = FRAME_WIDTH (f);
2939 FRAME_CHARHEIGHT (f) = FRAME_HEIGHT (f); 2991 FRAME_CHARHEIGHT (f) = FRAME_HEIGHT (f);
2940 } 2992 }
2941 2993
2942 MARK_FRAME_TOOLBARS_CHANGED (f); 2994 MARK_FRAME_TOOLBARS_CHANGED (f);
2995 MARK_FRAME_GUTTERS_CHANGED (f);
2943 MARK_FRAME_CHANGED (f); 2996 MARK_FRAME_CHANGED (f);
2944 f->echo_area_garbaged = 1; 2997 f->echo_area_garbaged = 1;
2945 } 2998 }
2946 2999
2947 void 3000 void
3120 } 3173 }
3121 3174
3122 void 3175 void
3123 syms_of_frame (void) 3176 syms_of_frame (void)
3124 { 3177 {
3178 INIT_LRECORD_IMPLEMENTATION (frame);
3179
3125 defsymbol (&Qdelete_frame_hook, "delete-frame-hook"); 3180 defsymbol (&Qdelete_frame_hook, "delete-frame-hook");
3126 defsymbol (&Qselect_frame_hook, "select-frame-hook"); 3181 defsymbol (&Qselect_frame_hook, "select-frame-hook");
3127 defsymbol (&Qdeselect_frame_hook, "deselect-frame-hook"); 3182 defsymbol (&Qdeselect_frame_hook, "deselect-frame-hook");
3128 defsymbol (&Qcreate_frame_hook, "create-frame-hook"); 3183 defsymbol (&Qcreate_frame_hook, "create-frame-hook");
3129 defsymbol (&Qcustom_initialize_frame, "custom-initialize-frame"); 3184 defsymbol (&Qcustom_initialize_frame, "custom-initialize-frame");
3180 defsymbol (&Quse_backing_store, "use-backing-store"); 3235 defsymbol (&Quse_backing_store, "use-backing-store");
3181 defsymbol (&Qborder_color, "border-color"); 3236 defsymbol (&Qborder_color, "border-color");
3182 defsymbol (&Qborder_width, "border-width"); 3237 defsymbol (&Qborder_width, "border-width");
3183 /* Qwidth, Qheight, Qleft, Qtop in general.c */ 3238 /* Qwidth, Qheight, Qleft, Qtop in general.c */
3184 defsymbol (&Qset_specifier, "set-specifier"); 3239 defsymbol (&Qset_specifier, "set-specifier");
3185 defsymbol (&Qset_glyph_image, "set-glyph-image");
3186 defsymbol (&Qset_face_property, "set-face-property"); 3240 defsymbol (&Qset_face_property, "set-face-property");
3187 defsymbol (&Qface_property_instance, "face-property-instance"); 3241 defsymbol (&Qface_property_instance, "face-property-instance");
3188 defsymbol (&Qframe_property_alias, "frame-property-alias"); 3242 defsymbol (&Qframe_property_alias, "frame-property-alias");
3189 3243
3190 DEFSUBR (Fmake_frame); 3244 DEFSUBR (Fmake_frame);
3218 DEFSUBR (Fframe_totally_visible_p); 3272 DEFSUBR (Fframe_totally_visible_p);
3219 DEFSUBR (Fframe_iconified_p); 3273 DEFSUBR (Fframe_iconified_p);
3220 DEFSUBR (Fvisible_frame_list); 3274 DEFSUBR (Fvisible_frame_list);
3221 DEFSUBR (Fraise_frame); 3275 DEFSUBR (Fraise_frame);
3222 DEFSUBR (Flower_frame); 3276 DEFSUBR (Flower_frame);
3277 DEFSUBR (Fdisable_frame);
3278 DEFSUBR (Fenable_frame);
3223 DEFSUBR (Fframe_property); 3279 DEFSUBR (Fframe_property);
3224 DEFSUBR (Fframe_properties); 3280 DEFSUBR (Fframe_properties);
3225 DEFSUBR (Fset_frame_properties); 3281 DEFSUBR (Fset_frame_properties);
3226 DEFSUBR (Fframe_pixel_height); 3282 DEFSUBR (Fframe_pixel_height);
3227 DEFSUBR (Fframe_pixel_width); 3283 DEFSUBR (Fframe_pixel_width);
3230 DEFSUBR (Fset_frame_height); 3286 DEFSUBR (Fset_frame_height);
3231 DEFSUBR (Fset_frame_width); 3287 DEFSUBR (Fset_frame_width);
3232 DEFSUBR (Fset_frame_size); 3288 DEFSUBR (Fset_frame_size);
3233 DEFSUBR (Fset_frame_position); 3289 DEFSUBR (Fset_frame_position);
3234 DEFSUBR (Fset_frame_pointer); 3290 DEFSUBR (Fset_frame_pointer);
3291 DEFSUBR (Fprint_job_page_number);
3292 DEFSUBR (Fprint_job_eject_page);
3235 } 3293 }
3236 3294
3237 void 3295 void
3238 vars_of_frame (void) 3296 vars_of_frame (void)
3239 { 3297 {
3343 visible frames. 3401 visible frames.
3344 */ ); 3402 */ );
3345 Vsynchronize_minibuffers = Qnil; 3403 Vsynchronize_minibuffers = Qnil;
3346 3404
3347 DEFVAR_LISP ("frame-title-format", &Vframe_title_format /* 3405 DEFVAR_LISP ("frame-title-format", &Vframe_title_format /*
3348 Controls the title of the X window corresponding to the selected frame. 3406 Controls the title of the window-system window of the selected frame.
3349 This is the same format as `modeline-format' with the exception that 3407 This is the same format as `modeline-format' with the exception that
3350 %- is ignored. 3408 %- is ignored.
3351 */ ); 3409 */ );
3410 /* #### I would change this unilaterally but for the wrath of the Kyles
3411 of the world. */
3412 #ifdef WIN32_NATIVE
3413 Vframe_title_format = build_string ("%b - XEmacs");
3414 #else
3352 Vframe_title_format = build_string ("%S: %b"); 3415 Vframe_title_format = build_string ("%S: %b");
3416 #endif
3353 3417
3354 DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /* 3418 DEFVAR_LISP ("frame-icon-title-format", &Vframe_icon_title_format /*
3355 Controls the title of the icon corresponding to the selected frame. 3419 Controls the title of the icon corresponding to the selected frame.
3356 See also the variable `frame-title-format'. 3420 See also the variable `frame-title-format'.
3357 */ ); 3421 */ );
3358 Vframe_icon_title_format = build_string ("%b"); 3422 Vframe_icon_title_format = build_string ("%b");
3359 3423
3360 DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /* 3424 DEFVAR_LISP ("default-frame-name", &Vdefault_frame_name /*
3361 The default name to assign to newly-created frames. 3425 The default name to assign to newly-created frames.
3362 This can be overridden by arguments to `make-frame'. 3426 This can be overridden by arguments to `make-frame'. This must be a string.
3363 This must be a string. 3427 This is used primarily for picking up X resources, and is *not* the title
3428 of the frame. (See `frame-title-format'.)
3364 */ ); 3429 */ );
3365 #ifndef INFODOCK 3430 #ifndef INFODOCK
3366 Vdefault_frame_name = build_string ("emacs"); 3431 Vdefault_frame_name = build_string ("emacs");
3367 #else 3432 #else
3368 Vdefault_frame_name = build_string ("InfoDock"); 3433 Vdefault_frame_name = build_string ("InfoDock");