# HG changeset patch # User Gerd Moellmann # Date 985027818 0 # Node ID f9243c6624b0854cfacf88f496b629dab7abe66a # Parent 771a25fb56dfd0a5a3d3e1d116ce96d7f8588898 (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]: Clear area of the frame not occupied by the scroll bar. diff -r 771a25fb56df -r f9243c6624b0 src/xterm.c --- a/src/xterm.c Mon Mar 19 17:34:12 2001 +0000 +++ b/src/xterm.c Mon Mar 19 18:50:18 2001 +0000 @@ -8729,7 +8729,6 @@ /* 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 @@ #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 @@ 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)