Mercurial > emacs
changeset 40610:e2da1b3f3d94
(x_scroll_bar_create): Check for width and height > 0.
(XTset_vertical_scroll_bar): Likewise.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 01 Nov 2001 11:24:41 +0000 |
parents | 3e60edf920ed |
children | 1ec9f5822539 |
files | src/xterm.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Thu Nov 01 11:11:44 2001 +0000 +++ b/src/xterm.c Thu Nov 01 11:24:41 2001 +0000 @@ -8956,9 +8956,10 @@ /* 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. */ @@ -9201,7 +9202,7 @@ /* 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), @@ -9233,7 +9234,7 @@ /* 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);