From: Martin Rudalics Date: Tue, 12 Aug 2014 09:47:27 +0000 (+0200) Subject: In set_menu_bar_lines call change_frame_size instead of set_menu_bar_lines_1. X-Git-Tag: emacs-25.0.90~2635^2~679^2~477 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bd4de70f13a92230da479e6fcd87d4355d626edf;p=emacs.git 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index aebe78e4dab..b3d38fa0310 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-08-12 Martin Rudalics + + * 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 * nsfns.m (Fx_create_frame): Call adjust_frame_size, diff --git a/src/frame.c b/src/frame.c index 6051b671cf3..501f01a3122 100644 --- a/src/frame.c +++ b/src/frame.c @@ -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); } }