[PATCH] Ignore MotionNotify when XI2 is handling mouse motion

Josef Schimke sgtcapslock at lavabit.com
Tue Jul 23 00:59:21 CDT 2013


Hello,

When XInput2 takes over the mouse, regular MotionNotify events continue to be
handled alongside it.  This causes the cursor to erratically skip around when
the slower method (X11 input) tries to reposition the cursor while XInput2 is
already handling future events.

I fixed it with this patch, but I'm not familiar with the wine code at all so
I really can't say if this is the proper way to do it or if it'll make
anything explode.

Regards,
Josef Schimke

--- dlls/winex11.drv/mouse.c.orig       2013-07-23 00:32:33.834027615 -0500
+++ dlls/winex11.drv/mouse.c    2013-07-23 00:51:06.627028942 -0500
@@ -1558,6 +1558,11 @@ void X11DRV_MotionNotify( HWND hwnd, XEv
     XMotionEvent *event = &xev->xmotion;
     INPUT input;
 
+#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H
+    if (x11drv_thread_data()->xi2_state == xi_enabled)
+        return;
+#endif
+
     TRACE( "hwnd %p/%lx pos %d,%d is_hint %d serial %lu\n",
            hwnd, event->window, event->x, event->y, event->is_hint, event->serial );




More information about the wine-patches mailing list