emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117694: In set_menu_bar_lines call change_frame_siz


From: Martin Rudalics
Subject: [Emacs-diffs] trunk r117694: In set_menu_bar_lines call change_frame_size instead of set_menu_bar_lines_1.
Date: Tue, 12 Aug 2014 09:47:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117694
revision-id: address@hidden
parent: address@hidden
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Tue 2014-08-12 11:47:27 +0200
message:
  In set_menu_bar_lines call change_frame_size instead of set_menu_bar_lines_1.
  
  * frame.c (set_menu_bar_lines_1): Remove.
  (set_menu_bar_lines): Call change_frame_size instead of
  set_menu_bar_lines_1.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/frame.c                    frame.c-20091113204419-o5vbwnq5f7feedwu-243
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-08-11 13:16:31 +0000
+++ b/src/ChangeLog     2014-08-12 09:47:27 +0000
@@ -1,3 +1,9 @@
+2014-08-12  Martin Rudalics  <address@hidden>
+
+       * 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  <address@hidden>
 
        * nsfns.m (Fx_create_frame): Call adjust_frame_size,

=== modified file 'src/frame.c'
--- a/src/frame.c       2014-08-10 08:26:28 +0000
+++ b/src/frame.c       2014-08-12 09:47:27 +0000
@@ -235,29 +235,6 @@
 #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)
 {
   int nlines;
@@ -278,11 +255,11 @@
   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);
     }
 }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]