aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKaroly Lorentey <[email protected]>2004-07-27 07:43:21 +0000
committerKaroly Lorentey <[email protected]>2004-07-27 07:43:21 +0000
commite1775c3e8209d76d22151282bc5343ed948b948c (patch)
treefb6614369baa846adfcc553eda24cc73b3f67961 /src/window.c
parent15dabcb48a89496d128b7159fbb8d498b7cfbda6 (diff)
parent38357a23f4887991726185607297a98a82680ea8 (diff)
Merged in changes from CVS trunk.
Patches applied: * [email protected]/emacs--cvs-trunk--0--patch-468 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-469 Update from CVS git-archimport-id: [email protected]/emacs--multi-tty--0--patch-222
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c
index 2ab9957153..5edabc510b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -581,6 +581,8 @@ display margins, fringes, header line, and/or mode line. */)
if it is on the window's modeline, return ON_MODE_LINE;
if it is on the border between the window and its right sibling,
return ON_VERTICAL_BORDER.
+ if it is on a scroll bar,
+ return ON_SCROLL_BAR.
if it is on the window's top line, return ON_HEADER_LINE;
if it is in left or right fringe of the window,
return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y
@@ -675,7 +677,7 @@ coordinates_in_window (w, x, y)
/* Outside any interesting column? */
if (*x < left_x || *x > right_x)
- return ON_VERTICAL_BORDER;
+ return ON_SCROLL_BAR;
lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
@@ -785,8 +787,8 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\
ly = Fcdr (coordinates);
CHECK_NUMBER_OR_FLOAT (lx);
CHECK_NUMBER_OR_FLOAT (ly);
- x = FRAME_PIXEL_X_FROM_CANON_X (f, lx);
- y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly);
+ x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH (f);
+ y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH (f);
switch (coordinates_in_window (w, &x, &y))
{
@@ -820,6 +822,10 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\
case ON_RIGHT_MARGIN:
return Qright_margin;
+ case ON_SCROLL_BAR:
+ /* Historically we are supposed to return nil in this case. */
+ return Qnil;
+
default:
abort ();
}
@@ -940,8 +946,10 @@ column 0. */)
CHECK_NUMBER_OR_FLOAT (y);
return window_from_coordinates (f,
- FRAME_PIXEL_X_FROM_CANON_X (f, x),
- FRAME_PIXEL_Y_FROM_CANON_Y (f, y),
+ (FRAME_PIXEL_X_FROM_CANON_X (f, x)
+ + FRAME_INTERNAL_BORDER_WIDTH (f)),
+ (FRAME_PIXEL_Y_FROM_CANON_Y (f, y)
+ + FRAME_INTERNAL_BORDER_WIDTH (f)),
0, 0, 0, 0);
}