changeset 15080:50f527612ef6

(x_scroll_bar_clear): Do nothing if frame now has no scroll bars.
author Richard M. Stallman <rms@gnu.org>
date Fri, 26 Apr 1996 16:38:03 +0000
parents b11a1ef8c709
children ab8c81feacf9
files src/xterm.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Fri Apr 26 16:06:54 1996 +0000
+++ b/src/xterm.c	Fri Apr 26 16:38:03 1996 +0000
@@ -3053,10 +3053,14 @@
 {
   Lisp_Object bar;
 
-  for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar);
-       bar = XSCROLL_BAR (bar)->next)
-    XClearArea (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)),
-		0, 0, 0, 0, True);
+  /* We can have scroll bars even if this is 0,
+     if we just turned off scroll bar mode.
+     But in that case we should not clear them.  */
+  if (FRAME_HAS_VERTICAL_SCROLL_BARS (f))
+    for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar);
+	 bar = XSCROLL_BAR (bar)->next)
+      XClearArea (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)),
+		  0, 0, 0, 0, True);
 }
 
 /* This processes Expose events from the menubar specific X event