aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-10-24 14:59:42 +0000
committerKim F. Storm2005-10-24 14:59:42 +0000
commit0a3fde9d0ec1674b76917448ede1e405b63ce8cd (patch)
treea724687d9cba95fcdc20c976ff9c5ed27a2e8902 /src
parent94717db170b7d2b77e3a00298147c2459595b999 (diff)
downloademacs-0a3fde9d0ec1674b76917448ede1e405b63ce8cd.tar.gz
emacs-0a3fde9d0ec1674b76917448ede1e405b63ce8cd.zip
Undo 2005-10-23 change.
(last_mouse_glyph_frame): New var. (note_mouse_movement): Say mouse moved if current frame differs from last_mouse_glyph_frame, and update last_mouse_glyph_frame. (XTmouse_position): Set last_mouse_glyph_frame. (handle_one_xevent): Clear last_mouse_glyph_frame [instead of last_mouse_glyph] on mouse up/down event.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 25283480c02..74fdd375364 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -249,6 +249,7 @@ static unsigned long ignore_next_mouse_click_timeout;
249/* Where the mouse was last time we reported a mouse event. */ 249/* Where the mouse was last time we reported a mouse event. */
250 250
251static XRectangle last_mouse_glyph; 251static XRectangle last_mouse_glyph;
252static FRAME_PTR last_mouse_glyph_frame;
252static Lisp_Object last_mouse_press_frame; 253static Lisp_Object last_mouse_press_frame;
253 254
254/* The scroll bar in which the last X motion event occurred. 255/* The scroll bar in which the last X motion event occurred.
@@ -3596,21 +3597,24 @@ note_mouse_movement (frame, event)
3596 frame->mouse_moved = 1; 3597 frame->mouse_moved = 1;
3597 last_mouse_scroll_bar = Qnil; 3598 last_mouse_scroll_bar = Qnil;
3598 note_mouse_highlight (frame, -1, -1); 3599 note_mouse_highlight (frame, -1, -1);
3600 last_mouse_glyph_frame = 0;
3599 return 1; 3601 return 1;
3600 } 3602 }
3601 3603
3602 note_mouse_highlight (frame, event->x, event->y);
3603 3604
3604 /* Has the mouse moved off the glyph it was on at the last sighting? */ 3605 /* Has the mouse moved off the glyph it was on at the last sighting? */
3605 if (event->x < last_mouse_glyph.x 3606 if (frame != last_mouse_glyph_frame
3607 || event->x < last_mouse_glyph.x
3606 || event->x >= last_mouse_glyph.x + last_mouse_glyph.width 3608 || event->x >= last_mouse_glyph.x + last_mouse_glyph.width
3607 || event->y < last_mouse_glyph.y 3609 || event->y < last_mouse_glyph.y
3608 || event->y >= last_mouse_glyph.y + last_mouse_glyph.height) 3610 || event->y >= last_mouse_glyph.y + last_mouse_glyph.height)
3609 { 3611 {
3610 frame->mouse_moved = 1; 3612 frame->mouse_moved = 1;
3611 last_mouse_scroll_bar = Qnil; 3613 last_mouse_scroll_bar = Qnil;
3614 note_mouse_highlight (frame, event->x, event->y);
3612 /* Remember which glyph we're now on. */ 3615 /* Remember which glyph we're now on. */
3613 remember_mouse_glyph (frame, event->x, event->y, &last_mouse_glyph); 3616 remember_mouse_glyph (frame, event->x, event->y, &last_mouse_glyph);
3617 last_mouse_glyph_frame = frame;
3614 return 1; 3618 return 1;
3615 } 3619 }
3616 3620
@@ -3821,6 +3825,7 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time)
3821 the frame are divided into. */ 3825 the frame are divided into. */
3822 3826
3823 remember_mouse_glyph (f1, win_x, win_y, &last_mouse_glyph); 3827 remember_mouse_glyph (f1, win_x, win_y, &last_mouse_glyph);
3828 last_mouse_glyph_frame = f1;
3824 3829
3825 *bar_window = Qnil; 3830 *bar_window = Qnil;
3826 *part = 0; 3831 *part = 0;
@@ -6658,7 +6663,7 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6658 int tool_bar_p = 0; 6663 int tool_bar_p = 0;
6659 6664
6660 bzero (&compose_status, sizeof (compose_status)); 6665 bzero (&compose_status, sizeof (compose_status));
6661 bzero (&last_mouse_glyph, sizeof (last_mouse_glyph)); 6666 last_mouse_glyph_frame = 0;
6662 6667
6663 if (dpyinfo->grabbed 6668 if (dpyinfo->grabbed
6664 && last_mouse_frame 6669 && last_mouse_frame