changeset 33870:8816b5542315

(x_change_window_heights): New function.
author Jason Rumney <jasonr@gnu.org>
date Fri, 24 Nov 2000 21:31:14 +0000
parents e41a7b1e443f
children 69c9cd380fd2
files src/w32fns.c
diffstat 1 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32fns.c	Fri Nov 24 21:30:06 2000 +0000
+++ b/src/w32fns.c	Fri Nov 24 21:31:14 2000 +0000
@@ -2472,6 +2472,36 @@
     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;