summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-03-19 18:50:47 +0000
committerGerd Moellmann <gerd@gnu.org>2001-03-19 18:50:47 +0000
commit357e737652a32cc5b353ebdacf2875edd7652482 (patch)
tree5850ee453cd5e302d16e1335080848446b2a6e6a /src
parent33a48912d70cc502ce88b3a65cf78dd3b6b3017b (diff)
downloademacs-357e737652a32cc5b353ebdacf2875edd7652482.tar.gz
(XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
Clear area of the frame not occupied by the scroll bar.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xterm.c20
2 files changed, 18 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index aa8e986a0a5..39b6f9ecebf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
2001-03-19 Gerd Moellmann <gerd@gnu.org>
+ * xterm.c (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]:
+ Clear area of the frame not occupied by the scroll bar.
+
* xfns.c (x_create_tip_frame): Add parameter TEXT. Set the
tip frame's root window buffer to *tip* right after creating
the frame.
diff --git a/src/xterm.c b/src/xterm.c
index 20c1fda2193..cd11231b122 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8729,7 +8729,6 @@ x_scroll_bar_set_handle (bar, start, end, rebuild)
/* Draw the handle itself. */
XFillRectangle (FRAME_X_DISPLAY (f), w, gc,
-
/* x, y, width, height */
VERTICAL_SCROLL_BAR_LEFT_BORDER,
VERTICAL_SCROLL_BAR_TOP_BORDER + start,
@@ -8875,12 +8874,10 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
#else /* not USE_TOOLKIT_SCROLL_BARS */
+ /* Clear areas not covered by the scroll bar because of
+ VERTICAL_SCROLL_BAR_WIDTH_TRIM. */
if (VERTICAL_SCROLL_BAR_WIDTH_TRIM)
{
- /* Clear areas not covered by the scroll bar. This makes sure a
- previous mode line display is cleared after C-x 2 C-x 1, for
- example. Non-toolkit scroll bars are as wide as the area
- reserved for scroll bars - trim at both sides. */
x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM,
height, False);
@@ -8889,6 +8886,19 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
top, VERTICAL_SCROLL_BAR_WIDTH_TRIM,
height, False);
}
+
+ /* Clear areas not covered by the scroll bar because it's not as
+ wide as the area reserved for it . This makes sure a
+ previous mode line display is cleared after C-x 2 C-x 1, for
+ example. */
+ {
+ 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, 0,
+ rest, max (height, 1), False);
+ }
/* Move/size the scroll bar window. */
if (mask)