}
}
-static void
+void
set_menu_bar_lines (f, value, oldval)
struct frame *f;
Lisp_Object value, oldval;
Vframe_list = Fcons (frame, Vframe_list);
terminal_frame_count++;
- if (terminal_frame_count == 1)
- {
- f->name = build_string ("Emacs");
- }
- else
- {
- sprintf (name, "Emacs-%d", terminal_frame_count);
- f->name = build_string (name);
- }
+ sprintf (name, "F%d", terminal_frame_count);
+ f->name = build_string (name);
f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */
f->async_visible = 1; /* Don't let visible be cleared later. */
if (NILP (force) && !other_visible_frames (f))
error ("Attempt to delete the sole visible or iconified frame");
+#if 0
+ /* This is a nice idea, but x_connection_closed needs to be able
+ to delete the last frame, if it is gone. */
+ if (NILP (XCONS (Vframe_list)->cdr))
+ error ("Attempt to delete the only frame");
+#endif
+
/* Does this frame have a minibuffer, and is it the surrogate
minibuffer for any other frame? */
if (FRAME_HAS_MINIBUF_P (XFRAME (frame)))
Vframe_list = Fdelq (frame, Vframe_list);
FRAME_SET_VISIBLE (f, 0);
+ if (echo_area_glyphs == FRAME_MESSAGE_BUF (f))
+ {
+ echo_area_glyphs = 0;
+ previous_echo_glyphs = 0;
+ }
+
if (f->namebuf)
free (f->namebuf);
if (FRAME_CURRENT_GLYPHS (f))
DEFUN ("frame-pixel-height", Fframe_pixel_height,
Sframe_pixel_height, 0, 1, 0,
"Return a FRAME's height in pixels.\n\
+This counts only the height available for text lines,\n\
+not menu bars on window-system Emacs frames.\n\
For a terminal frame, the result really gives the height in characters.\n\
If FRAME is omitted, the selected frame is used.")
(frame)