aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog3
-rw-r--r--src/window.c22
2 files changed, 15 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e193d4bbc9f..449ef0402fc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12000-12-06 Gerd Moellmann <gerd@gnu.org> 12000-12-06 Gerd Moellmann <gerd@gnu.org>
2 2
3 * window.c (coordinates_in_window): Check mouse on mode-line or
4 header-line first.
5
3 * alloc.c (Fgarbage_collect): Dox fix. Return a list as 6 * alloc.c (Fgarbage_collect): Dox fix. Return a list as
4 advertized by the function documentation. 7 advertized by the function documentation.
5 8
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)
524 bottom_y = WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y (w); 524 bottom_y = WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y (w);
525 } 525 }
526 526
527 /* Completely outside anything interesting? */
528 if (*y < top_y
529 || *y >= bottom_y
530 || *x < (left_x
531 - flags_area_width
532 - (FRAME_LEFT_SCROLL_BAR_WIDTH (f)
533 * CANON_X_UNIT (f)))
534 || *x > right_x + flags_area_width)
535 return ON_NOTHING;
536
537 /* On the mode line or header line? If it's near the start of 527 /* On the mode line or header line? If it's near the start of
538 the mode or header line of window that's has a horizontal 528 the mode or header line of window that's has a horizontal
539 sibling, say it's on the vertical line. That's to be able 529 sibling, say it's on the vertical line. That's to be able
@@ -541,6 +531,7 @@ coordinates_in_window (w, x, y)
541 scroll bars. */ 531 scroll bars. */
542 532
543 if (WINDOW_WANTS_MODELINE_P (w) 533 if (WINDOW_WANTS_MODELINE_P (w)
534 && *y < bottom_y
544 && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w)) 535 && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w))
545 { 536 {
546 if (!WINDOW_RIGHTMOST_P (w) 537 if (!WINDOW_RIGHTMOST_P (w)
@@ -552,6 +543,7 @@ coordinates_in_window (w, x, y)
552 } 543 }
553 544
554 if (WINDOW_WANTS_HEADER_LINE_P (w) 545 if (WINDOW_WANTS_HEADER_LINE_P (w)
546 && *y >= top_y
555 && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w)) 547 && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
556 { 548 {
557 if (!WINDOW_RIGHTMOST_P (w) 549 if (!WINDOW_RIGHTMOST_P (w)
@@ -562,6 +554,16 @@ coordinates_in_window (w, x, y)
562 return ON_HEADER_LINE; 554 return ON_HEADER_LINE;
563 } 555 }
564 556
557 /* Completely outside anything interesting? */
558 if (*y < top_y
559 || *y >= bottom_y
560 || *x < (left_x
561 - flags_area_width
562 - (FRAME_LEFT_SCROLL_BAR_WIDTH (f)
563 * CANON_X_UNIT (f)))
564 || *x > right_x + flags_area_width)
565 return ON_NOTHING;
566
565 if (FRAME_WINDOW_P (f)) 567 if (FRAME_WINDOW_P (f))
566 { 568 {
567 if (!w->pseudo_window_p 569 if (!w->pseudo_window_p