summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-12-15 18:48:23 +0000
committerRichard M. Stallman <rms@gnu.org>1996-12-15 18:48:23 +0000
commit0a26b136cd6b721be4270edba5b52dbd712a2665 (patch)
tree8c4236bd07e632cb1adad92858243426e52e6b12 /src/xfns.c
parente9286904effac040c230b830964189e473c3f66c (diff)
downloademacs-0a26b136cd6b721be4270edba5b52dbd712a2665.tar.gz
(x_set_scroll_bar_width): Reject a width that's too small.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c
index ee63ba5f44f..169a47e4b81 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1983,6 +1983,10 @@ x_set_scroll_bar_width (f, arg, oldval)
&& XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f))
{
int wid = FONT_WIDTH (f->output_data.x->font);
+
+ if (XFASTINT (arg) < 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM)
+ Fsignal (Qargs_out_of_range, Fcons (arg, Qnil));
+
FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = XFASTINT (arg);
FRAME_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + wid-1) / wid;
if (FRAME_X_WINDOW (f))