diff options
author | Gerd Moellmann <[email protected]> | 2001-10-26 11:59:32 +0000 |
---|---|---|
committer | Gerd Moellmann <[email protected]> | 2001-10-26 11:59:32 +0000 |
commit | 38d2af0c9e92820c368d4264fed7ab8ec62251ac (patch) | |
tree | 28229cc97a13c9e9608415f5a5e59f682f36eecf /src/xterm.c | |
parent | 56f508dd1c1d0304f2601ea7b2eef92969590a63 (diff) |
(XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
Fix clearning in the case of scroll bars on the right.
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c index d23593e3d2..5e48bbdf9d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9253,10 +9253,16 @@ XTset_vertical_scroll_bar (w, portion, whole, position) { int area_width = FRAME_SCROLL_BAR_COLS (f) * CANON_X_UNIT (f); int rest = area_width - sb_width; - if (rest > 0) - x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - left + area_width - rest, top, - rest, max (height, 1), False); + if (rest > 0 && height > 0) + { + if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + left + area_width - rest, top, + rest, height, False); + else + x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + left, top, rest, height, False); + } } /* Move/size the scroll bar window. */ |