aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2001-12-01 01:15:43 +0000
committerKim F. Storm2001-12-01 01:15:43 +0000
commitc13418acb6a08994fcd7809bf00f77edd7de9e27 (patch)
tree5511c36ab2f8e8a1beeae441732e473af9ccaa59 /src
parent82ee92ea9bb56efcb95414106b489cbfa60dabcd (diff)
downloademacs-c13418acb6a08994fcd7809bf00f77edd7de9e27.tar.gz
emacs-c13418acb6a08994fcd7809bf00f77edd7de9e27.zip
(coordinates_in_window): Handle separate left and right fringe widths.
Diffstat (limited to 'src')
-rw-r--r--src/window.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c
index b83861828e0..1c75478111f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -511,7 +511,6 @@ coordinates_in_window (w, x, y)
511 everywhere. */ 511 everywhere. */
512 struct frame *f = XFRAME (WINDOW_FRAME (w)); 512 struct frame *f = XFRAME (WINDOW_FRAME (w));
513 int left_x, right_x, top_y, bottom_y; 513 int left_x, right_x, top_y, bottom_y;
514 int fringe_width = FRAME_LEFT_FRINGE_WIDTH (f);
515 enum window_part part; 514 enum window_part part;
516 int ux = CANON_X_UNIT (f); 515 int ux = CANON_X_UNIT (f);
517 int x0 = XFASTINT (w->left) * ux; 516 int x0 = XFASTINT (w->left) * ux;
@@ -584,10 +583,10 @@ coordinates_in_window (w, x, y)
584 else if (*y < top_y 583 else if (*y < top_y
585 || *y >= bottom_y 584 || *y >= bottom_y
586 || *x < (left_x 585 || *x < (left_x
587 - fringe_width 586 - FRAME_LEFT_FRINGE_WIDTH (f)
588 - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * ux) 587 - FRAME_LEFT_SCROLL_BAR_WIDTH (f) * ux)
589 || *x > (right_x 588 || *x > (right_x
590 + fringe_width 589 + FRAME_RIGHT_FRINGE_WIDTH (f)
591 + FRAME_RIGHT_SCROLL_BAR_WIDTH (f) * ux)) 590 + FRAME_RIGHT_SCROLL_BAR_WIDTH (f) * ux))
592 { 591 {
593 part = ON_NOTHING; 592 part = ON_NOTHING;
@@ -597,7 +596,7 @@ coordinates_in_window (w, x, y)
597 if (!w->pseudo_window_p 596 if (!w->pseudo_window_p
598 && !FRAME_HAS_VERTICAL_SCROLL_BARS (f) 597 && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)
599 && !WINDOW_RIGHTMOST_P (w) 598 && !WINDOW_RIGHTMOST_P (w)
600 && (abs (*x - right_x - fringe_width) < grabbable_width)) 599 && (abs (*x - right_x - FRAME_RIGHT_FRINGE_WIDTH (f)) < grabbable_width))
601 { 600 {
602 part = ON_VERTICAL_BORDER; 601 part = ON_VERTICAL_BORDER;
603 } 602 }