aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c
index c68228cc51a..5fe258caa29 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2698,9 +2698,10 @@ term_mouse_movement (FRAME_PTR frame, Gpm_Event *event)
2698static void 2698static void
2699term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, 2699term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
2700 enum scroll_bar_part *part, Lisp_Object *x, 2700 enum scroll_bar_part *part, Lisp_Object *x,
2701 Lisp_Object *y, unsigned long *timeptr) 2701 Lisp_Object *y, Time *timeptr)
2702{ 2702{
2703 struct timeval now; 2703 struct timeval now;
2704 Time sec, usec;
2704 2705
2705 *fp = SELECTED_FRAME (); 2706 *fp = SELECTED_FRAME ();
2706 (*fp)->mouse_moved = 0; 2707 (*fp)->mouse_moved = 0;
@@ -2711,7 +2712,9 @@ term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
2711 XSETINT (*x, last_mouse_x); 2712 XSETINT (*x, last_mouse_x);
2712 XSETINT (*y, last_mouse_y); 2713 XSETINT (*y, last_mouse_y);
2713 gettimeofday(&now, 0); 2714 gettimeofday(&now, 0);
2714 *timeptr = (now.tv_sec * 1000) + (now.tv_usec / 1000); 2715 sec = now.tv_sec;
2716 usec = now.tv_usec;
2717 *timeptr = (sec * 1000) + (usec / 1000);
2715} 2718}
2716 2719
2717/* Prepare a mouse-event in *RESULT for placement in the input queue. 2720/* Prepare a mouse-event in *RESULT for placement in the input queue.