diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-11-01 11:25:01 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-11-01 11:25:01 +0000 |
commit | 7b49b9d282a2a06fccb9abdf1ddfc8726445769b (patch) | |
tree | 88ba4237d0b923125f70458e1e36b1ffce9a7b21 /src/xterm.c | |
parent | 43f7c3ea0cc6872ac018531122f17801f0baf825 (diff) | |
download | emacs-7b49b9d282a2a06fccb9abdf1ddfc8726445769b.tar.gz |
(x_scroll_bar_create): Check for width and height > 0.
(XTset_vertical_scroll_bar): Likewise.
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xterm.c b/src/xterm.c index 706ca1463b9..83da1b5aec0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8956,9 +8956,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. */ @@ -9201,7 +9202,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), @@ -9233,7 +9234,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); |