From: Gerd Moellmann Date: Thu, 1 Nov 2001 11:30:57 +0000 (+0000) Subject: (x_scroll_bar_create): Check for width and height > 0. X-Git-Tag: emacs-21.2~380 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=deb26a735c38021757cc7c70f6975d71ce28ccdc;p=emacs.git (x_scroll_bar_create): Check for width and height > 0. (XTset_vertical_scroll_bar): Likewise. --- diff --git a/src/xterm.c b/src/xterm.c index 840a7ab9e43..6040a23ebce 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8942,9 +8942,10 @@ x_scroll_bar_create (w, top, left, width, height) /* Clear the area of W that will serve as a scroll bar. This is for the case that a window has been split horizontally. In this case, no clear_frame is generated to reduce flickering. */ - x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left, top, width, - window_box_height (w), False); + if (width > 0 && height > 0) + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + left, top, width, + window_box_height (w), False); window = XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), /* Position and size of scroll bar. */ @@ -9187,7 +9188,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position) /* Does the scroll bar exist yet? */ if (NILP (w->vertical_scroll_bar)) { - if (width && height) + if (width > 0 && height > 0) { BLOCK_INPUT; x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), @@ -9219,7 +9220,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position) /* Since toolkit scroll bars are smaller than the space reserved for them on the frame, we have to clear "under" them. */ - if (width && height) + if (width > 0 && height > 0) x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), left, top, width, height, False);