From a12586671e817cae3321704b264bc76fd692b928 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 24 Nov 2000 21:31:14 +0000 Subject: [PATCH] (x_change_window_heights): New function. --- src/w32fns.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/w32fns.c b/src/w32fns.c index a3f5d8bf0ac..6ab167a3240 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -2472,6 +2472,36 @@ x_set_visibility (f, value, oldval) Fmake_frame_visible (frame); } + +/* Change window heights in windows rooted in WINDOW by N lines. */ + +static void +x_change_window_heights (window, n) + Lisp_Object window; + int n; +{ + struct window *w = XWINDOW (window); + + XSETFASTINT (w->top, XFASTINT (w->top) + n); + XSETFASTINT (w->height, XFASTINT (w->height) - n); + + if (INTEGERP (w->orig_top)) + XSETFASTINT (w->orig_top, XFASTINT (w->orig_top) + n); + if (INTEGERP (w->orig_height)) + XSETFASTINT (w->orig_height, XFASTINT (w->orig_height) - n); + + /* Handle just the top child in a vertical split. */ + if (!NILP (w->vchild)) + x_change_window_heights (w->vchild, n); + + /* Adjust all children in a horizontal split. */ + for (window = w->hchild; !NILP (window); window = w->next) + { + w = XWINDOW (window); + x_change_window_heights (window, n); + } +} + void x_set_menu_bar_lines (f, value, oldval) struct frame *f; -- 2.39.2