diff options
| author | Gerd Moellmann | 2001-03-19 18:50:47 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-03-19 18:50:47 +0000 |
| commit | 357e737652a32cc5b353ebdacf2875edd7652482 (patch) | |
| tree | 5850ee453cd5e302d16e1335080848446b2a6e6a /src | |
| parent | 33a48912d70cc502ce88b3a65cf78dd3b6b3017b (diff) | |
| download | emacs-357e737652a32cc5b353ebdacf2875edd7652482.tar.gz emacs-357e737652a32cc5b353ebdacf2875edd7652482.zip | |
(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/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xterm.c | 20 |
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 @@ | |||
| 1 | 2001-03-19 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-03-19 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xterm.c (XTset_vertical_scroll_bar) [!USE_TOOLKIT_SCROLL_BARS]: | ||
| 4 | Clear area of the frame not occupied by the scroll bar. | ||
| 5 | |||
| 3 | * xfns.c (x_create_tip_frame): Add parameter TEXT. Set the | 6 | * xfns.c (x_create_tip_frame): Add parameter TEXT. Set the |
| 4 | tip frame's root window buffer to *tip* right after creating | 7 | tip frame's root window buffer to *tip* right after creating |
| 5 | the frame. | 8 | 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) | |||
| 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, |
| @@ -8875,12 +8874,10 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 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); |
| @@ -8889,6 +8886,19 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 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) |