summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-06-04 07:14:47 +0000
committerRichard M. Stallman <rms@gnu.org>1993-06-04 07:14:47 +0000
commit47c0f58be5c3efbc54c36bc803453e87c67303f0 (patch)
treef7b557917c5f2e72e12f73ba0a3472d555628fc3 /src/xfns.c
parent704182054c50e4646480ec9de60fded779ff7043 (diff)
downloademacs-47c0f58be5c3efbc54c36bc803453e87c67303f0.tar.gz
(x_set_menu_bar_lines_1): Adjust just the uppermost child
in a vertical split. Adjust the hight counter to the top. (x_set_menu_bar_lines): Don't change overall frame height.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/xfns.c b/src/xfns.c
index d83c5958c22..a6a02a02298 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -929,17 +929,20 @@ x_set_menu_bar_lines_1 (window, n)
Lisp_Object window;
int n;
{
- for (; !NILP (window); window = XWINDOW (window)->next)
- {
- struct window *w = XWINDOW (window);
+ struct window *w = XWINDOW (window);
- XFASTINT (w->top) += n;
+ XFASTINT (w->top) += n;
+ XFASTINT (w->height) -= n;
- if (!NILP (w->vchild))
- x_set_menu_bar_lines_1 (w->vchild, n);
+ /* Handle just the top child in a vertical split. */
+ if (!NILP (w->vchild))
+ x_set_menu_bar_lines_1 (w->vchild, n);
- if (!NILP (w->hchild))
- x_set_menu_bar_lines_1 (w->hchild, n);
+ /* Adjust all children in a horizontal split. */
+ for (window = w->hchild; !NILP (window); window = w->next)
+ {
+ w = XWINDOW (window);
+ x_set_menu_bar_lines_1 (window, n);
}
}
@@ -965,16 +968,6 @@ x_set_menu_bar_lines (f, value, oldval)
FRAME_MENU_BAR_LINES (f) = nlines;
x_set_menu_bar_lines_1 (f->root_window, nlines - olines);
- /* Use FRAME_NEW_WIDTH, HEIGHT so as not to override a size change
- made by the user but not fully reflected in the Emacs frame object. */
- x_set_window_size (f,
- (FRAME_NEW_WIDTH (f)
- ? FRAME_NEW_WIDTH (f)
- : FRAME_WIDTH (f)),
- ((FRAME_NEW_HEIGHT (f)
- ? FRAME_NEW_HEIGHT (f)
- : FRAME_HEIGHT (f))
- + nlines - olines));
}
/* Change the name of frame F to ARG. If ARG is nil, set F's name to