diff options
author | Gerd Moellmann <gerd@gnu.org> | 2000-12-06 15:19:50 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2000-12-06 15:19:50 +0000 |
commit | e1d0538761aceddeffd42d482d60b5f09eab4da0 (patch) | |
tree | 1876220bebf819b21ff0bbdf3ffc71350192b6d9 /src/window.c | |
parent | 46f0206a5fa8df31bcf1929ac71551abead7422f (diff) | |
download | emacs-e1d0538761aceddeffd42d482d60b5f09eab4da0.tar.gz |
(coordinates_in_window): Check mouse on mode-line or
header-line first.
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/window.c b/src/window.c index 3b4bf2b1446..708c0475636 100644 --- a/src/window.c +++ b/src/window.c @@ -524,16 +524,6 @@ coordinates_in_window (w, x, y) bottom_y = WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y (w); } - /* Completely outside anything interesting? */ - if (*y < top_y - || *y >= bottom_y - || *x < (left_x - - flags_area_width - - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) - * CANON_X_UNIT (f))) - || *x > right_x + flags_area_width) - return ON_NOTHING; - /* On the mode line or header line? If it's near the start of the mode or header line of window that's has a horizontal sibling, say it's on the vertical line. That's to be able @@ -541,6 +531,7 @@ coordinates_in_window (w, x, y) scroll bars. */ if (WINDOW_WANTS_MODELINE_P (w) + && *y < bottom_y && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w)) { if (!WINDOW_RIGHTMOST_P (w) @@ -552,6 +543,7 @@ coordinates_in_window (w, x, y) } if (WINDOW_WANTS_HEADER_LINE_P (w) + && *y >= top_y && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w)) { if (!WINDOW_RIGHTMOST_P (w) @@ -562,6 +554,16 @@ coordinates_in_window (w, x, y) return ON_HEADER_LINE; } + /* Completely outside anything interesting? */ + if (*y < top_y + || *y >= bottom_y + || *x < (left_x + - flags_area_width + - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) + * CANON_X_UNIT (f))) + || *x > right_x + flags_area_width) + return ON_NOTHING; + if (FRAME_WINDOW_P (f)) { if (!w->pseudo_window_p |