2000-12-06 Gerd Moellmann <gerd@gnu.org>
+ * window.c (coordinates_in_window): Check mouse on mode-line or
+ header-line first.
+
* alloc.c (Fgarbage_collect): Dox fix. Return a list as
advertized by the function documentation.
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
scroll bars. */
if (WINDOW_WANTS_MODELINE_P (w)
+ && *y < bottom_y
&& *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w))
{
if (!WINDOW_RIGHTMOST_P (w)
}
if (WINDOW_WANTS_HEADER_LINE_P (w)
+ && *y >= top_y
&& *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
{
if (!WINDOW_RIGHTMOST_P (w)
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