aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c29
1 files changed, 3 insertions, 26 deletions
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