aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 7d8c40b8cf0..9e10037685b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3860,19 +3860,20 @@ construct_mouse_click (struct input_event *result,
3860 the mainstream emacs code by setting mouse_moved. If not, ask for 3860 the mainstream emacs code by setting mouse_moved. If not, ask for
3861 another motion event, so we can check again the next time it moves. */ 3861 another motion event, so we can check again the next time it moves. */
3862 3862
3863static XMotionEvent last_mouse_motion_event;
3864static Lisp_Object last_mouse_motion_frame;
3865
3866static int 3863static int
3867note_mouse_movement (struct frame *frame, const XMotionEvent *event) 3864note_mouse_movement (struct frame *frame, const XMotionEvent *event)
3868{ 3865{
3869 last_mouse_movement_time = event->time; 3866 struct x_display_info *dpyinfo;
3870 last_mouse_motion_event = *event;
3871 XSETFRAME (last_mouse_motion_frame, frame);
3872 3867
3873 if (!FRAME_X_OUTPUT (frame)) 3868 if (!FRAME_X_OUTPUT (frame))
3874 return 0; 3869 return 0;
3875 3870
3871 dpyinfo = FRAME_DISPLAY_INFO (frame);
3872 last_mouse_movement_time = event->time;
3873 dpyinfo->last_mouse_motion_frame = frame;
3874 dpyinfo->last_mouse_motion_x = event->x;
3875 dpyinfo->last_mouse_motion_y = event->y;
3876
3876 if (event->window != FRAME_X_WINDOW (frame)) 3877 if (event->window != FRAME_X_WINDOW (frame))
3877 { 3878 {
3878 frame->mouse_moved = 1; 3879 frame->mouse_moved = 1;
@@ -3902,23 +3903,6 @@ note_mouse_movement (struct frame *frame, const XMotionEvent *event)
3902 return 0; 3903 return 0;
3903} 3904}
3904 3905
3905
3906/************************************************************************
3907 Mouse Face
3908 ************************************************************************/
3909
3910static void
3911redo_mouse_highlight (void)
3912{
3913 if (!NILP (last_mouse_motion_frame)
3914 && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame)))
3915 note_mouse_highlight (XFRAME (last_mouse_motion_frame),
3916 last_mouse_motion_event.x,
3917 last_mouse_motion_event.y);
3918}
3919
3920
3921
3922/* Return the current position of the mouse. 3906/* Return the current position of the mouse.
3923 *FP should be a frame which indicates which display to ask about. 3907 *FP should be a frame which indicates which display to ask about.
3924 3908
@@ -6223,7 +6207,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
6223 if (event->xunmap.window == tip_window) 6207 if (event->xunmap.window == tip_window)
6224 { 6208 {
6225 tip_window = 0; 6209 tip_window = 0;
6226 redo_mouse_highlight (); 6210 x_redo_mouse_highlight (dpyinfo);
6227 } 6211 }
6228 6212
6229 f = x_top_window_to_frame (dpyinfo, event->xunmap.window); 6213 f = x_top_window_to_frame (dpyinfo, event->xunmap.window);
@@ -10705,9 +10689,6 @@ With MS Windows or Nextstep, the value is t. */);
10705 Vx_toolkit_scroll_bars = Qnil; 10689 Vx_toolkit_scroll_bars = Qnil;
10706#endif 10690#endif
10707 10691
10708 staticpro (&last_mouse_motion_frame);
10709 last_mouse_motion_frame = Qnil;
10710
10711 Qmodifier_value = intern_c_string ("modifier-value"); 10692 Qmodifier_value = intern_c_string ("modifier-value");
10712 Qalt = intern_c_string ("alt"); 10693 Qalt = intern_c_string ("alt");
10713 Fput (Qalt, Qmodifier_value, make_number (alt_modifier)); 10694 Fput (Qalt, Qmodifier_value, make_number (alt_modifier));