]> git.eshelyaron.com Git - emacs.git/commitdiff
* xterm.c (x_last_mouse_movement_time) [X_MOTION_HISTORY]: Fix last change.
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 2 Sep 2013 10:37:06 +0000 (14:37 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Mon, 2 Sep 2013 10:37:06 +0000 (14:37 +0400)
src/xterm.c

index bc7dd639c6ba2afc545c89762043afb0417e9989..1870aae5a6d41702b7b377012123002e3de30b17 100644 (file)
@@ -3727,11 +3727,15 @@ x_last_mouse_movement_time (struct frame *f)
 {
   Time t;
   int nevents;
-  XTimeCoord *xtc = XGetMotionEvents (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                                     1, last_user_time, &nevents);
+  XTimeCoord *xtc;
+
+  block_input ();
+  xtc = XGetMotionEvents (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                         1, last_user_time, &nevents);
   eassert (xtc && nevents > 0);
   t = xtc[nevents - 1].time;
   XFree (xtc);
+  unblock_input ();
   return t;
 }