diff options
| author | Richard M. Stallman | 1996-12-15 18:48:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-12-15 18:48:23 +0000 |
| commit | 0a26b136cd6b721be4270edba5b52dbd712a2665 (patch) | |
| tree | 8c4236bd07e632cb1adad92858243426e52e6b12 /src | |
| parent | e9286904effac040c230b830964189e473c3f66c (diff) | |
| download | emacs-0a26b136cd6b721be4270edba5b52dbd712a2665.tar.gz emacs-0a26b136cd6b721be4270edba5b52dbd712a2665.zip | |
(x_set_scroll_bar_width): Reject a width that's too small.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 4 |
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) | |||
| 1983 | && XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f)) | 1983 | && XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f)) |
| 1984 | { | 1984 | { |
| 1985 | int wid = FONT_WIDTH (f->output_data.x->font); | 1985 | int wid = FONT_WIDTH (f->output_data.x->font); |
| 1986 | |||
| 1987 | if (XFASTINT (arg) < 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM) | ||
| 1988 | Fsignal (Qargs_out_of_range, Fcons (arg, Qnil)); | ||
| 1989 | |||
| 1986 | FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = XFASTINT (arg); | 1990 | FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = XFASTINT (arg); |
| 1987 | FRAME_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + wid-1) / wid; | 1991 | FRAME_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + wid-1) / wid; |
| 1988 | if (FRAME_X_WINDOW (f)) | 1992 | if (FRAME_X_WINDOW (f)) |