comparison src/xterm.c @ 36880:f9243c6624b0

(XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]: Clear area of the frame not occupied by the scroll bar.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 19 Mar 2001 18:50:18 +0000
parents 7c7084a9f736
children 9d0ed4b0c89a
comparison
equal deleted inserted replaced
36879:771a25fb56df 36880:f9243c6624b0
8727 XSetForeground (FRAME_X_DISPLAY (f), gc, 8727 XSetForeground (FRAME_X_DISPLAY (f), gc,
8728 f->output_data.x->scroll_bar_foreground_pixel); 8728 f->output_data.x->scroll_bar_foreground_pixel);
8729 8729
8730 /* Draw the handle itself. */ 8730 /* Draw the handle itself. */
8731 XFillRectangle (FRAME_X_DISPLAY (f), w, gc, 8731 XFillRectangle (FRAME_X_DISPLAY (f), w, gc,
8732
8733 /* x, y, width, height */ 8732 /* x, y, width, height */
8734 VERTICAL_SCROLL_BAR_LEFT_BORDER, 8733 VERTICAL_SCROLL_BAR_LEFT_BORDER,
8735 VERTICAL_SCROLL_BAR_TOP_BORDER + start, 8734 VERTICAL_SCROLL_BAR_TOP_BORDER + start,
8736 inside_width, end - start); 8735 inside_width, end - start);
8737 8736
8873 sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, 8872 sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
8874 max (height, 1), 0); 8873 max (height, 1), 0);
8875 8874
8876 #else /* not USE_TOOLKIT_SCROLL_BARS */ 8875 #else /* not USE_TOOLKIT_SCROLL_BARS */
8877 8876
8877 /* Clear areas not covered by the scroll bar because of
8878 VERTICAL_SCROLL_BAR_WIDTH_TRIM. */
8878 if (VERTICAL_SCROLL_BAR_WIDTH_TRIM) 8879 if (VERTICAL_SCROLL_BAR_WIDTH_TRIM)
8879 { 8880 {
8880 /* Clear areas not covered by the scroll bar. This makes sure a
8881 previous mode line display is cleared after C-x 2 C-x 1, for
8882 example. Non-toolkit scroll bars are as wide as the area
8883 reserved for scroll bars - trim at both sides. */
8884 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 8881 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
8885 left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, 8882 left, top, VERTICAL_SCROLL_BAR_WIDTH_TRIM,
8886 height, False); 8883 height, False);
8887 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 8884 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
8888 left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM, 8885 left + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM,
8889 top, VERTICAL_SCROLL_BAR_WIDTH_TRIM, 8886 top, VERTICAL_SCROLL_BAR_WIDTH_TRIM,
8890 height, False); 8887 height, False);
8891 } 8888 }
8889
8890 /* Clear areas not covered by the scroll bar because it's not as
8891 wide as the area reserved for it . This makes sure a
8892 previous mode line display is cleared after C-x 2 C-x 1, for
8893 example. */
8894 {
8895 int area_width = FRAME_SCROLL_BAR_COLS (f) * CANON_X_UNIT (f);
8896 int rest = area_width - sb_width;
8897 if (rest > 0)
8898 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
8899 left + area_width - rest, 0,
8900 rest, max (height, 1), False);
8901 }
8892 8902
8893 /* Move/size the scroll bar window. */ 8903 /* Move/size the scroll bar window. */
8894 if (mask) 8904 if (mask)
8895 { 8905 {
8896 XWindowChanges wc; 8906 XWindowChanges wc;