changeset 68919:82552609c524

(x_set_menu_bar_lines): Menu bar is always shown on Mac.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Wed, 15 Feb 2006 08:41:36 +0000
parents 5aa4a7ce059a
children fb48cce09e61
files src/macfns.c
diffstat 1 files changed, 7 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/src/macfns.c	Wed Feb 15 08:41:12 2006 +0000
+++ b/src/macfns.c	Wed Feb 15 08:41:36 2006 +0000
@@ -1647,36 +1647,15 @@
      struct frame *f;
      Lisp_Object value, oldval;
 {
-  int nlines;
-  int olines = FRAME_MENU_BAR_LINES (f);
-
-  /* Right now, menu bars don't work properly in minibuf-only frames;
-     most of the commands try to apply themselves to the minibuffer
-     frame itself, and get an error because you can't switch buffers
-     in or split the minibuffer window.  */
-  if (FRAME_MINIBUF_ONLY_P (f))
-    return;
-
-  if (INTEGERP (value))
-    nlines = XINT (value);
-  else
-    nlines = 0;
+  /* Make sure we redisplay all windows in this frame.  */
+  windows_or_buffers_changed++;
 
   FRAME_MENU_BAR_LINES (f) = 0;
-  if (nlines)
-    FRAME_EXTERNAL_MENU_BAR (f) = 1;
-  else
-    {
-      if (FRAME_EXTERNAL_MENU_BAR (f) == 1)
-	free_frame_menubar (f);
-      FRAME_EXTERNAL_MENU_BAR (f) = 0;
-
-      /* Adjust the frame size so that the client (text) dimensions
-	 remain the same.  This depends on FRAME_EXTERNAL_MENU_BAR being
-	 set correctly.  */
-      x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
-      do_pending_window_change (0);
-    }
+  /* The menu bar is always shown.  */
+  FRAME_EXTERNAL_MENU_BAR (f) = 1;
+  if (FRAME_MAC_P (f) && f->output_data.mac->menubar_widget == 0)
+    /* Make sure next redisplay shows the menu bar.  */
+    XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = Qt;
   adjust_glyphs (f);
 }