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