diff options
| author | Miles Bader | 2004-07-28 07:05:52 +0000 |
|---|---|---|
| committer | Miles Bader | 2004-07-28 07:05:52 +0000 |
| commit | 54685a78a73fcf2f53fd0e8a7a3c7478b8650f1b (patch) | |
| tree | 998cde32667cb156ef66ceda314d53b168370588 /src/window.c | |
| parent | 6bb4a8bf9aaa63141ad7c12ab6b6ba9939050178 (diff) | |
| parent | b687047c72d2d13ced9ce55d38193b24ec722773 (diff) | |
| download | emacs-54685a78a73fcf2f53fd0e8a7a3c7478b8650f1b.tar.gz emacs-54685a78a73fcf2f53fd0e8a7a3c7478b8650f1b.zip | |
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-26
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-466
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-470
Update from CVS
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c index 1b1cab13e7a..9c94a43c3cd 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -579,6 +579,8 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 579 | if it is on the window's modeline, return ON_MODE_LINE; | 579 | if it is on the window's modeline, return ON_MODE_LINE; |
| 580 | if it is on the border between the window and its right sibling, | 580 | if it is on the border between the window and its right sibling, |
| 581 | return ON_VERTICAL_BORDER. | 581 | return ON_VERTICAL_BORDER. |
| 582 | if it is on a scroll bar, | ||
| 583 | return ON_SCROLL_BAR. | ||
| 582 | if it is on the window's top line, return ON_HEADER_LINE; | 584 | if it is on the window's top line, return ON_HEADER_LINE; |
| 583 | if it is in left or right fringe of the window, | 585 | if it is in left or right fringe of the window, |
| 584 | return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y | 586 | return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y |
| @@ -673,7 +675,7 @@ coordinates_in_window (w, x, y) | |||
| 673 | 675 | ||
| 674 | /* Outside any interesting column? */ | 676 | /* Outside any interesting column? */ |
| 675 | if (*x < left_x || *x > right_x) | 677 | if (*x < left_x || *x > right_x) |
| 676 | return ON_VERTICAL_BORDER; | 678 | return ON_SCROLL_BAR; |
| 677 | 679 | ||
| 678 | lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); | 680 | lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); |
| 679 | rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); | 681 | rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); |
| @@ -783,8 +785,8 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ | |||
| 783 | ly = Fcdr (coordinates); | 785 | ly = Fcdr (coordinates); |
| 784 | CHECK_NUMBER_OR_FLOAT (lx); | 786 | CHECK_NUMBER_OR_FLOAT (lx); |
| 785 | CHECK_NUMBER_OR_FLOAT (ly); | 787 | CHECK_NUMBER_OR_FLOAT (ly); |
| 786 | x = FRAME_PIXEL_X_FROM_CANON_X (f, lx); | 788 | x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH (f); |
| 787 | y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly); | 789 | y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH (f); |
| 788 | 790 | ||
| 789 | switch (coordinates_in_window (w, &x, &y)) | 791 | switch (coordinates_in_window (w, &x, &y)) |
| 790 | { | 792 | { |
| @@ -818,6 +820,10 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ | |||
| 818 | case ON_RIGHT_MARGIN: | 820 | case ON_RIGHT_MARGIN: |
| 819 | return Qright_margin; | 821 | return Qright_margin; |
| 820 | 822 | ||
| 823 | case ON_SCROLL_BAR: | ||
| 824 | /* Historically we are supposed to return nil in this case. */ | ||
| 825 | return Qnil; | ||
| 826 | |||
| 821 | default: | 827 | default: |
| 822 | abort (); | 828 | abort (); |
| 823 | } | 829 | } |
| @@ -938,8 +944,10 @@ column 0. */) | |||
| 938 | CHECK_NUMBER_OR_FLOAT (y); | 944 | CHECK_NUMBER_OR_FLOAT (y); |
| 939 | 945 | ||
| 940 | return window_from_coordinates (f, | 946 | return window_from_coordinates (f, |
| 941 | FRAME_PIXEL_X_FROM_CANON_X (f, x), | 947 | (FRAME_PIXEL_X_FROM_CANON_X (f, x) |
| 942 | FRAME_PIXEL_Y_FROM_CANON_Y (f, y), | 948 | + FRAME_INTERNAL_BORDER_WIDTH (f)), |
| 949 | (FRAME_PIXEL_Y_FROM_CANON_Y (f, y) | ||
| 950 | + FRAME_INTERNAL_BORDER_WIDTH (f)), | ||
| 943 | 0, 0, 0, 0); | 951 | 0, 0, 0, 0); |
| 944 | } | 952 | } |
| 945 | 953 | ||