aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorMiles Bader2006-04-17 08:41:12 +0000
committerMiles Bader2006-04-17 08:41:12 +0000
commitcfc2051d0ed5a268528a647ab0911a2f5cc451de (patch)
treecb622fe0b6c1ba8b97314fb80ba2fd8fad60a5a2 /src/window.c
parentca49cf1703cc20d50653c32ca2f438c8819b78bd (diff)
parente4a89ccf738861d7b9c4f611185aa0f204c9c208 (diff)
downloademacs-cfc2051d0ed5a268528a647ab0911a2f5cc451de.tar.gz
emacs-cfc2051d0ed5a268528a647ab0911a2f5cc451de.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-56
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 204-225) - Update from CVS - Sync from erc--emacs--0 - Merge from gnus--rel--5.10 - Improve tq.el. - Update from CVS: src/puresize.h (PURESIZE_RATIO): Reduce to 10/6. * gnus--rel--5.10 (patch 81-85) - Update from CVS - Merge from emacs--devo--0
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index 039e955efd0..d4e6ac3569f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -661,12 +661,20 @@ coordinates_in_window (w, x, y)
661 || WINDOW_RIGHTMOST_P (w)) 661 || WINDOW_RIGHTMOST_P (w))
662 { 662 {
663 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width) 663 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width)
664 return ON_VERTICAL_BORDER; 664 {
665 *x = max (0, *x - x0);
666 *y -= top_y;
667 return ON_VERTICAL_BORDER;
668 }
665 } 669 }
666 else 670 else
667 { 671 {
668 if (abs (*x - x1) < grabbable_width) 672 if (abs (*x - x1) < grabbable_width)
669 return ON_VERTICAL_BORDER; 673 {
674 *x = min (x1, *x) - x0;
675 *y -= top_y;
676 return ON_VERTICAL_BORDER;
677 }
670 } 678 }
671 679
672 if (*x < x0 || *x >= x1) 680 if (*x < x0 || *x >= x1)
@@ -708,7 +716,11 @@ coordinates_in_window (w, x, y)
708 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) 716 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
709 && !WINDOW_RIGHTMOST_P (w) 717 && !WINDOW_RIGHTMOST_P (w)
710 && (abs (*x - right_x) < grabbable_width)) 718 && (abs (*x - right_x) < grabbable_width))
711 return ON_VERTICAL_BORDER; 719 {
720 *x = min (right_x, *x) - left_x;
721 *y -= top_y;
722 return ON_VERTICAL_BORDER;
723 }
712 } 724 }
713 else 725 else
714 { 726 {
@@ -720,6 +732,8 @@ coordinates_in_window (w, x, y)
720 { 732 {
721 /* On the border on the right side of the window? Assume that 733 /* On the border on the right side of the window? Assume that
722 this area begins at RIGHT_X minus a canonical char width. */ 734 this area begins at RIGHT_X minus a canonical char width. */
735 *x = min (right_x, *x) - left_x;
736 *y -= top_y;
723 return ON_VERTICAL_BORDER; 737 return ON_VERTICAL_BORDER;
724 } 738 }
725 } 739 }