# HG changeset patch # User Victor Luchits # Date 1431603656 -10800 # Thu May 14 14:40:56 2015 +0300 # Node ID 3248586e5a4b71030599c8a9a1e69a30618914d4 # Parent 223fbcc6a3274ebc99e043beec9426ee8436025a Fix duplicate raw mouse events with XInput2 Make XGrabPointer calls in X11_SetWindowGrab and X11_CaptureMouse consistent by passing False to owner_mask along with proper event_mask. diff -r 223fbcc6a327 -r 3248586e5a4b src/video/x11/SDL_x11window.c --- a/src/video/x11/SDL_x11window.c Wed May 13 22:39:32 2015 -0700 +++ b/src/video/x11/SDL_x11window.c Thu May 14 14:40:56 2015 +0300 @@ -1329,9 +1329,12 @@ if (oldstyle_fullscreen || grabbed) { /* Try to grab the mouse */ for (;;) { + const unsigned int mask = ButtonPressMask | ButtonReleaseMask + | PointerMotionMask | FocusChangeMask; int result = - X11_XGrabPointer(display, data->xwindow, True, 0, GrabModeAsync, - GrabModeAsync, data->xwindow, None, CurrentTime); + X11_XGrabPointer(display, data->xwindow, False, mask, + GrabModeAsync, GrabModeAsync, data->xwindow, + None, CurrentTime); if (result == GrabSuccess) { break; }