From: Jason Rumney Date: Fri, 24 Nov 2000 21:31:14 +0000 (+0000) Subject: (x_change_window_heights): New function. X-Git-Tag: emacs-pretest-21.0.92~81 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a12586671e817cae3321704b264bc76fd692b928;p=emacs.git (x_change_window_heights): New function. --- 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;