]> git.eshelyaron.com Git - emacs.git/commitdiff
In set_menu_bar_lines call change_frame_size instead of set_menu_bar_lines_1.
authorMartin Rudalics <rudalics@gmx.at>
Tue, 12 Aug 2014 09:47:27 +0000 (11:47 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 12 Aug 2014 09:47:27 +0000 (11:47 +0200)
* frame.c (set_menu_bar_lines_1): Remove.
(set_menu_bar_lines): Call change_frame_size instead of
set_menu_bar_lines_1.

src/ChangeLog
src/frame.c

index aebe78e4dab5a63950406dda03d02ab37f41cfe4..b3d38fa0310dd42799d04680f1d8a81712c6a36b 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-12  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.c (set_menu_bar_lines_1): Remove.
+       (set_menu_bar_lines): Call change_frame_size instead of
+       set_menu_bar_lines_1.
+
 2014-08-11  Jan Djärv  <jan.h.d@swipnet.se>
 
        * nsfns.m (Fx_create_frame): Call adjust_frame_size,
index 6051b671cf3caee200933ca674ac13e19eb03203..501f01a3122aa8c25f198b92730ccca1cc0d64cc 100644 (file)
@@ -234,29 +234,6 @@ frame_inhibit_resize (struct frame *f, bool horizontal)
 }
 #endif
 
-static void
-set_menu_bar_lines_1 (Lisp_Object window, int n)
-{
-  struct window *w = XWINDOW (window);
-  struct frame *f = XFRAME (WINDOW_FRAME (w));
-
-  w->top_line += n;
-  w->pixel_top += n * FRAME_LINE_HEIGHT (f);
-  w->total_lines -= n;
-  w->pixel_height -= n * FRAME_LINE_HEIGHT (f);
-
-  /* Handle just the top child in a vertical split.  */
-  if (WINDOW_VERTICAL_COMBINATION_P (w))
-    set_menu_bar_lines_1 (w->contents, n);
-  else if (WINDOW_HORIZONTAL_COMBINATION_P (w))
-    /* Adjust all children in a horizontal split.  */
-    for (window = w->contents; !NILP (window); window = w->next)
-      {
-       w = XWINDOW (window);
-       set_menu_bar_lines_1 (window, n);
-      }
-}
-
 static void
 set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
@@ -278,11 +255,11 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   if (nlines != olines)
     {
       windows_or_buffers_changed = 14;
-      FRAME_WINDOW_SIZES_CHANGED (f) = 1;
       FRAME_MENU_BAR_LINES (f) = nlines;
       FRAME_MENU_BAR_HEIGHT (f) = nlines * FRAME_LINE_HEIGHT (f);
-      set_menu_bar_lines_1 (f->root_window, nlines - olines);
-      adjust_frame_glyphs (f);
+      change_frame_size (f, FRAME_COLS (f),
+                        FRAME_LINES (f) + olines - nlines,
+                        0, 1, 0, 0);
     }
 }
 \f