aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2014-08-12 11:47:27 +0200
committerMartin Rudalics2014-08-12 11:47:27 +0200
commitbd4de70f13a92230da479e6fcd87d4355d626edf (patch)
treebb85227f6a6f1c14606dfcf8bacb51a46e4a3dc6
parente024465e2d69a05360b6e47be0f9c9d4b5a7deaa (diff)
downloademacs-bd4de70f13a92230da479e6fcd87d4355d626edf.tar.gz
emacs-bd4de70f13a92230da479e6fcd87d4355d626edf.zip
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.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/frame.c29
2 files changed, 9 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index aebe78e4dab..b3d38fa0310 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-08-12 Martin Rudalics <rudalics@gmx.at>
2
3 * frame.c (set_menu_bar_lines_1): Remove.
4 (set_menu_bar_lines): Call change_frame_size instead of
5 set_menu_bar_lines_1.
6
12014-08-11 Jan Djärv <jan.h.d@swipnet.se> 72014-08-11 Jan Djärv <jan.h.d@swipnet.se>
2 8
3 * nsfns.m (Fx_create_frame): Call adjust_frame_size, 9 * 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
@@ -235,29 +235,6 @@ frame_inhibit_resize (struct frame *f, bool horizontal)
235#endif 235#endif
236 236
237static void 237static void
238set_menu_bar_lines_1 (Lisp_Object window, int n)
239{
240 struct window *w = XWINDOW (window);
241 struct frame *f = XFRAME (WINDOW_FRAME (w));
242
243 w->top_line += n;
244 w->pixel_top += n * FRAME_LINE_HEIGHT (f);
245 w->total_lines -= n;
246 w->pixel_height -= n * FRAME_LINE_HEIGHT (f);
247
248 /* Handle just the top child in a vertical split. */
249 if (WINDOW_VERTICAL_COMBINATION_P (w))
250 set_menu_bar_lines_1 (w->contents, n);
251 else if (WINDOW_HORIZONTAL_COMBINATION_P (w))
252 /* Adjust all children in a horizontal split. */
253 for (window = w->contents; !NILP (window); window = w->next)
254 {
255 w = XWINDOW (window);
256 set_menu_bar_lines_1 (window, n);
257 }
258}
259
260static void
261set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 238set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
262{ 239{
263 int nlines; 240 int nlines;
@@ -278,11 +255,11 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
278 if (nlines != olines) 255 if (nlines != olines)
279 { 256 {
280 windows_or_buffers_changed = 14; 257 windows_or_buffers_changed = 14;
281 FRAME_WINDOW_SIZES_CHANGED (f) = 1;
282 FRAME_MENU_BAR_LINES (f) = nlines; 258 FRAME_MENU_BAR_LINES (f) = nlines;
283 FRAME_MENU_BAR_HEIGHT (f) = nlines * FRAME_LINE_HEIGHT (f); 259 FRAME_MENU_BAR_HEIGHT (f) = nlines * FRAME_LINE_HEIGHT (f);
284 set_menu_bar_lines_1 (f->root_window, nlines - olines); 260 change_frame_size (f, FRAME_COLS (f),
285 adjust_frame_glyphs (f); 261 FRAME_LINES (f) + olines - nlines,
262 0, 1, 0, 0);
286 } 263 }
287} 264}
288 265