From: Patrick Rudolph Subject: winex11.drv: don't drop raw input events after mouse warp Message-Id: <6123d2a3326a8b1dd4d5947251fd108c@das-labor.org> Date: Sun, 14 Dec 2014 13:46:24 +0100 This patch fixes bug https://bugs.winehq.org/show_bug.cgi?id=32913 After each mouse move the cursor is warped back to the center of the screen. This is OK for XInput, but not for XInput2 as XInput2 reports raw events that doesn't care about absolute screen coordinates and doesn't need to be dropped. There're frequent cursor warps resulting in lot's of dropped raw motion events (up to all). These dropped motion events cause mouse jitter, which is notable in FPS games, but not while using any GUI that only needs pixel coordinates. The problem remains for virtual desktop as XInput2 is never turned on, but that's another issue. Please review. From f7758fc8efc11f9aa278a88eb6a0f73e304331d8 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sun, 14 Dec 2014 13:27:10 +0100 Subject: don't drop raw input events after mouse warp --- dlls/winex11.drv/mouse.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index f1e58fe..741d718 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1669,16 +1669,6 @@ static void X11DRV_RawMotion( XGenericEventCookie *xev ) break; } - if (thread_data->warp_serial) - { - if ((long)(xev->serial - thread_data->warp_serial) < 0) - { - TRACE( "pos %d,%d old serial %lu, ignoring\n", input.u.mi.dx, input.u.mi.dy, xev->serial ); - return; - } - thread_data->warp_serial = 0; /* we caught up now */ - } - TRACE( "pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); input.type = INPUT_MOUSE; -- 2.1.0