aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-04 07:14:47 +0000
committerRichard M. Stallman1993-06-04 07:14:47 +0000
commit47c0f58be5c3efbc54c36bc803453e87c67303f0 (patch)
treef7b557917c5f2e72e12f73ba0a3472d555628fc3 /src
parent704182054c50e4646480ec9de60fded779ff7043 (diff)
downloademacs-47c0f58be5c3efbc54c36bc803453e87c67303f0.tar.gz
emacs-47c0f58be5c3efbc54c36bc803453e87c67303f0.zip
(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')
-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)
929 Lisp_Object window; 929 Lisp_Object window;
930 int n; 930 int n;
931{ 931{
932 for (; !NILP (window); window = XWINDOW (window)->next) 932 struct window *w = XWINDOW (window);
933 {
934 struct window *w = XWINDOW (window);
935 933
936 XFASTINT (w->top) += n; 934 XFASTINT (w->top) += n;
935 XFASTINT (w->height) -= n;
937 936
938 if (!NILP (w->vchild)) 937 /* Handle just the top child in a vertical split. */
939 x_set_menu_bar_lines_1 (w->vchild, n); 938 if (!NILP (w->vchild))
939 x_set_menu_bar_lines_1 (w->vchild, n);
940 940
941 if (!NILP (w->hchild)) 941 /* Adjust all children in a horizontal split. */
942 x_set_menu_bar_lines_1 (w->hchild, n); 942 for (window = w->hchild; !NILP (window); window = w->next)
943 {
944 w = XWINDOW (window);
945 x_set_menu_bar_lines_1 (window, n);
943 } 946 }
944} 947}
945 948
@@ -965,16 +968,6 @@ x_set_menu_bar_lines (f, value, oldval)
965 968
966 FRAME_MENU_BAR_LINES (f) = nlines; 969 FRAME_MENU_BAR_LINES (f) = nlines;
967 x_set_menu_bar_lines_1 (f->root_window, nlines - olines); 970 x_set_menu_bar_lines_1 (f->root_window, nlines - olines);
968 /* Use FRAME_NEW_WIDTH, HEIGHT so as not to override a size change
969 made by the user but not fully reflected in the Emacs frame object. */
970 x_set_window_size (f,
971 (FRAME_NEW_WIDTH (f)
972 ? FRAME_NEW_WIDTH (f)
973 : FRAME_WIDTH (f)),
974 ((FRAME_NEW_HEIGHT (f)
975 ? FRAME_NEW_HEIGHT (f)
976 : FRAME_HEIGHT (f))
977 + nlines - olines));
978} 971}
979 972
980/* Change the name of frame F to ARG. If ARG is nil, set F's name to 973/* Change the name of frame F to ARG. If ARG is nil, set F's name to