aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-03-02 12:04:38 +0000
committerGerd Moellmann2001-03-02 12:04:38 +0000
commitf964b4d79cfbd1d54bde608cf87c5776b07fb459 (patch)
treec5c6915ca0819c83357a65dc3df958252374737b
parent8b797f292d68cf2f9924bbac88d41f22987d6c2a (diff)
downloademacs-f964b4d79cfbd1d54bde608cf87c5776b07fb459.tar.gz
emacs-f964b4d79cfbd1d54bde608cf87c5776b07fb459.zip
(XTset_vertical_scroll_bar): Don't clear a zero height
or width area. (XTset_vertical_scroll_bar, x_scroll_bar_create): Don't configure a widget to zero height.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/xterm.c30
2 files changed, 23 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7f3285bdae2..135969d183f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12001-03-02 Gerd Moellmann <gerd@gnu.org>
2
3 * xterm.c (XTset_vertical_scroll_bar): Don't clear a zero height
4 or width area.
5 (XTset_vertical_scroll_bar, x_scroll_bar_create): Don't configure
6 a widget to zero height.
7
12001-03-01 Gerd Moellmann <gerd@gnu.org> 82001-03-01 Gerd Moellmann <gerd@gnu.org>
2 9
3 * window.c (Fwindow_end): Call move_it_past_eol only if 10 * window.c (Fwindow_end): Call move_it_past_eol only if
diff --git a/src/xterm.c b/src/xterm.c
index 9c75606b53b..6db999e241e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8420,15 +8420,15 @@ x_scroll_bar_create (w, top, left, width, height)
8420 8420
8421 /* Map the window/widget. */ 8421 /* Map the window/widget. */
8422#ifdef USE_TOOLKIT_SCROLL_BARS 8422#ifdef USE_TOOLKIT_SCROLL_BARS
8423 { 8423 {
8424 Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar); 8424 Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
8425 XtConfigureWidget (scroll_bar, 8425 XtConfigureWidget (scroll_bar,
8426 left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, 8426 left + VERTICAL_SCROLL_BAR_WIDTH_TRIM,
8427 top, 8427 top,
8428 width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, 8428 width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
8429 height, 0); 8429 max (height, 1), 0);
8430 XtMapWidget (scroll_bar); 8430 XtMapWidget (scroll_bar);
8431 } 8431 }
8432#else /* not USE_TOOLKIT_SCROLL_BARS */ 8432#else /* not USE_TOOLKIT_SCROLL_BARS */
8433 XMapRaised (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar)); 8433 XMapRaised (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar));
8434#endif /* not USE_TOOLKIT_SCROLL_BARS */ 8434#endif /* not USE_TOOLKIT_SCROLL_BARS */
@@ -8628,8 +8628,9 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
8628 if (NILP (w->vertical_scroll_bar)) 8628 if (NILP (w->vertical_scroll_bar))
8629 { 8629 {
8630 BLOCK_INPUT; 8630 BLOCK_INPUT;
8631 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 8631 if (width && height)
8632 left, top, width, height, False); 8632 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
8633 left, top, width, height, False);
8633 UNBLOCK_INPUT; 8634 UNBLOCK_INPUT;
8634 bar = x_scroll_bar_create (w, top, sb_left, sb_width, height); 8635 bar = x_scroll_bar_create (w, top, sb_left, sb_width, height);
8635 } 8636 }
@@ -8655,8 +8656,9 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
8655 8656
8656 /* Since toolkit scroll bars are smaller than the space reserved 8657 /* Since toolkit scroll bars are smaller than the space reserved
8657 for them on the frame, we have to clear "under" them. */ 8658 for them on the frame, we have to clear "under" them. */
8658 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 8659 if (width && height)
8659 left, top, width, height, False); 8660 x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
8661 left, top, width, height, False);
8660 8662
8661 /* Move/size the scroll bar widget. */ 8663 /* Move/size the scroll bar widget. */
8662 if (mask) 8664 if (mask)
@@ -8664,7 +8666,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
8664 sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, 8666 sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM,
8665 top, 8667 top,
8666 sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, 8668 sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
8667 height, 0); 8669 max (height, 1), 0);
8668 8670
8669#else /* not USE_TOOLKIT_SCROLL_BARS */ 8671#else /* not USE_TOOLKIT_SCROLL_BARS */
8670 8672