From: Richard M. Stallman Date: Fri, 26 Apr 1996 16:38:03 +0000 (+0000) Subject: (x_scroll_bar_clear): Do nothing if frame now has no scroll bars. X-Git-Tag: emacs-19.34~781 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b80c363eee95c3653196e9fd213414cafcffcf25;p=emacs.git (x_scroll_bar_clear): Do nothing if frame now has no scroll bars. --- diff --git a/src/xterm.c b/src/xterm.c index 1155ba44169..094240651ab 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3053,10 +3053,14 @@ x_scroll_bar_clear (f) { 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