Mercurial > emacs
changeset 16682:fe4b95eb15ae
(x_set_scroll_bar_width): Reject a width that's too small.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 15 Dec 1996 18:48:23 +0000 |
parents | 58b38425b463 |
children | 6802dbd07a80 |
files | src/xfns.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfns.c Sun Dec 15 07:30:24 1996 +0000 +++ b/src/xfns.c Sun Dec 15 18:48:23 1996 +0000 @@ -1983,6 +1983,10 @@ && 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))