From 38d2af0c9e92820c368d4264fed7ab8ec62251ac Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 26 Oct 2001 11:59:32 +0000 Subject: [PATCH] (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]: Fix clearning in the case of scroll bars on the right. --- src/ChangeLog | 5 +++++ src/xterm.c | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bd6b5dfe704..dc42d2d7717 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-10-26 Gerd Moellmann + + * xterm.c (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]: + Fix clearing in the case of scroll bars on the right. + 2001-10-26 Juanma Barranquero * w32gui.h (XImage): Add a dummy typedef. diff --git a/src/xterm.c b/src/xterm.c index d23593e3d2a..5e48bbdf9dc 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. */ -- 2.39.5