From def74bdc4849c1bae460ffadd47072a7171215b3 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Mon, 2 Sep 2013 14:37:06 +0400 Subject: [PATCH] * xterm.c (x_last_mouse_movement_time) [X_MOTION_HISTORY]: Fix last change. --- src/xterm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index bc7dd639c6b..1870aae5a6d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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; } -- 2.39.2