aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-07-27 07:43:21 +0000
committerKaroly Lorentey2004-07-27 07:43:21 +0000
commite1775c3e8209d76d22151282bc5343ed948b948c (patch)
treefb6614369baa846adfcc553eda24cc73b3f67961 /src/window.c
parent15dabcb48a89496d128b7159fbb8d498b7cfbda6 (diff)
parent38357a23f4887991726185607297a98a82680ea8 (diff)
downloademacs-e1775c3e8209d76d22151282bc5343ed948b948c.tar.gz
emacs-e1775c3e8209d76d22151282bc5343ed948b948c.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-468 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-469 Update from CVS git-archimport-id: lorentey@elte.hu--2004/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 2ab9957153f..5edabc510be 100644
--- a/src/window.c
+++ b/src/window.c
@@ -581,6 +581,8 @@ display margins, fringes, header line, and/or mode line. */)
581 if it is on the window's modeline, return ON_MODE_LINE; 581 if it is on the window's modeline, return ON_MODE_LINE;
582 if it is on the border between the window and its right sibling, 582 if it is on the border between the window and its right sibling,
583 return ON_VERTICAL_BORDER. 583 return ON_VERTICAL_BORDER.
584 if it is on a scroll bar,
585 return ON_SCROLL_BAR.
584 if it is on the window's top line, return ON_HEADER_LINE; 586 if it is on the window's top line, return ON_HEADER_LINE;
585 if it is in left or right fringe of the window, 587 if it is in left or right fringe of the window,
586 return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y 588 return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y
@@ -675,7 +677,7 @@ coordinates_in_window (w, x, y)
675 677
676 /* Outside any interesting column? */ 678 /* Outside any interesting column? */
677 if (*x < left_x || *x > right_x) 679 if (*x < left_x || *x > right_x)
678 return ON_VERTICAL_BORDER; 680 return ON_SCROLL_BAR;
679 681
680 lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); 682 lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
681 rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); 683 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\
785 ly = Fcdr (coordinates); 787 ly = Fcdr (coordinates);
786 CHECK_NUMBER_OR_FLOAT (lx); 788 CHECK_NUMBER_OR_FLOAT (lx);
787 CHECK_NUMBER_OR_FLOAT (ly); 789 CHECK_NUMBER_OR_FLOAT (ly);
788 x = FRAME_PIXEL_X_FROM_CANON_X (f, lx); 790 x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH (f);
789 y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly); 791 y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH (f);
790 792
791 switch (coordinates_in_window (w, &x, &y)) 793 switch (coordinates_in_window (w, &x, &y))
792 { 794 {
@@ -820,6 +822,10 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\
820 case ON_RIGHT_MARGIN: 822 case ON_RIGHT_MARGIN:
821 return Qright_margin; 823 return Qright_margin;
822 824
825 case ON_SCROLL_BAR:
826 /* Historically we are supposed to return nil in this case. */
827 return Qnil;
828
823 default: 829 default:
824 abort (); 830 abort ();
825 } 831 }
@@ -940,8 +946,10 @@ column 0. */)
940 CHECK_NUMBER_OR_FLOAT (y); 946 CHECK_NUMBER_OR_FLOAT (y);
941 947
942 return window_from_coordinates (f, 948 return window_from_coordinates (f,
943 FRAME_PIXEL_X_FROM_CANON_X (f, x), 949 (FRAME_PIXEL_X_FROM_CANON_X (f, x)
944 FRAME_PIXEL_Y_FROM_CANON_Y (f, y), 950 + FRAME_INTERNAL_BORDER_WIDTH (f)),
951 (FRAME_PIXEL_Y_FROM_CANON_Y (f, y)
952 + FRAME_INTERNAL_BORDER_WIDTH (f)),
945 0, 0, 0, 0); 953 0, 0, 0, 0);
946} 954}
947 955