diff options
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c index c64e8557b56..22ca145b206 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -609,9 +609,6 @@ coordinates_in_window (w, x, y) | |||
| 609 | int grabbable_width = ux; | 609 | int grabbable_width = ux; |
| 610 | int lmargin_width, rmargin_width, text_left, text_right; | 610 | int lmargin_width, rmargin_width, text_left, text_right; |
| 611 | 611 | ||
| 612 | if (*x < x0 || *x >= x1) | ||
| 613 | return ON_NOTHING; | ||
| 614 | |||
| 615 | /* In what's below, we subtract 1 when computing right_x because we | 612 | /* In what's below, we subtract 1 when computing right_x because we |
| 616 | want the rightmost pixel, which is given by left_pixel+width-1. */ | 613 | want the rightmost pixel, which is given by left_pixel+width-1. */ |
| 617 | if (w->pseudo_window_p) | 614 | if (w->pseudo_window_p) |
| @@ -661,6 +658,9 @@ coordinates_in_window (w, x, y) | |||
| 661 | return ON_VERTICAL_BORDER; | 658 | return ON_VERTICAL_BORDER; |
| 662 | } | 659 | } |
| 663 | 660 | ||
| 661 | if (*x < x0 || *x >= x1) | ||
| 662 | return ON_NOTHING; | ||
| 663 | |||
| 664 | /* Convert X and Y to window relative coordinates. | 664 | /* Convert X and Y to window relative coordinates. |
| 665 | Mode line starts at left edge of window. */ | 665 | Mode line starts at left edge of window. */ |
| 666 | *x -= x0; | 666 | *x -= x0; |
| @@ -675,6 +675,9 @@ coordinates_in_window (w, x, y) | |||
| 675 | goto header_vertical_border_check; | 675 | goto header_vertical_border_check; |
| 676 | } | 676 | } |
| 677 | 677 | ||
| 678 | if (*x < x0 || *x >= x1) | ||
| 679 | return ON_NOTHING; | ||
| 680 | |||
| 678 | /* Outside any interesting column? */ | 681 | /* Outside any interesting column? */ |
| 679 | if (*x < left_x || *x > right_x) | 682 | if (*x < left_x || *x > right_x) |
| 680 | return ON_SCROLL_BAR; | 683 | return ON_SCROLL_BAR; |
| @@ -6036,9 +6039,9 @@ display marginal areas and the text area. */) | |||
| 6036 | struct window *w = decode_window (window); | 6039 | struct window *w = decode_window (window); |
| 6037 | 6040 | ||
| 6038 | if (!NILP (left)) | 6041 | if (!NILP (left)) |
| 6039 | CHECK_NUMBER (left); | 6042 | CHECK_NATNUM (left); |
| 6040 | if (!NILP (right)) | 6043 | if (!NILP (right)) |
| 6041 | CHECK_NUMBER (right); | 6044 | CHECK_NATNUM (right); |
| 6042 | 6045 | ||
| 6043 | if (!EQ (w->left_fringe_width, left) | 6046 | if (!EQ (w->left_fringe_width, left) |
| 6044 | || !EQ (w->right_fringe_width, right) | 6047 | || !EQ (w->right_fringe_width, right) |
| @@ -6098,7 +6101,7 @@ If TYPE is t, use the frame's scroll-bar type. */) | |||
| 6098 | struct window *w = decode_window (window); | 6101 | struct window *w = decode_window (window); |
| 6099 | 6102 | ||
| 6100 | if (!NILP (width)) | 6103 | if (!NILP (width)) |
| 6101 | CHECK_NUMBER (width); | 6104 | CHECK_NATNUM (width); |
| 6102 | 6105 | ||
| 6103 | if (XINT (width) == 0) | 6106 | if (XINT (width) == 0) |
| 6104 | vertical_type = Qnil; | 6107 | vertical_type = Qnil; |