summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-08-15 22:01:01 +0000
committerGerd Moellmann <gerd@gnu.org>1999-08-15 22:01:01 +0000
commitfe6f39d99bb4b8cb1784fb4775be4adc551cc6ea (patch)
treec7c7a83ddd77e1c4acf3739eda1e2ce0d7dd1d5d
parent233a4a2c3f36a526e564017a80ce313ea15903ea (diff)
downloademacs-fe6f39d99bb4b8cb1784fb4775be4adc551cc6ea.tar.gz
(XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
Simplify clearing "under" scroll bar.
-rw-r--r--src/xterm.c39
1 files changed, 6 insertions, 33 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 7d166ada160..8d668408312 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7915,39 +7915,12 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
mask |= CWHeight;
#ifdef USE_TOOLKIT_SCROLL_BARS
-
- if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f))
- {
- XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- pixel_left + pixel_width - scroll_bar_area_width,
- pixel_top,
- (scroll_bar_area_width
- - pixel_width
- + VERTICAL_SCROLL_BAR_WIDTH_TRIM),
- pixel_height, False);
- XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- (pixel_left
- + pixel_width
- - VERTICAL_SCROLL_BAR_WIDTH_TRIM),
- pixel_top,
- VERTICAL_SCROLL_BAR_WIDTH_TRIM,
- pixel_height, False);
- }
- else
- {
- XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- pixel_left, pixel_top,
- VERTICAL_SCROLL_BAR_WIDTH_TRIM, pixel_height, False);
- XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- (pixel_left
- + pixel_width
- - VERTICAL_SCROLL_BAR_WIDTH_TRIM),
- pixel_top,
- (scroll_bar_area_width
- - pixel_width
- + VERTICAL_SCROLL_BAR_WIDTH_TRIM),
- pixel_height, False);
- }
+
+ /* Since toolkit scroll bars are smaller than the space reserved
+ for them on the frame, we have to clear "under" them. */
+ XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+ pixel_left, pixel_top,
+ pixel_width + 1, pixel_height, False);
/* Move/size the scroll bar widget. */
if (mask)