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.
parent
447194987c
commit
afc97cbd5d
|
@ -1329,9 +1329,12 @@ X11_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
||||||
if (oldstyle_fullscreen || grabbed) {
|
if (oldstyle_fullscreen || grabbed) {
|
||||||
/* Try to grab the mouse */
|
/* Try to grab the mouse */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
const unsigned int mask = ButtonPressMask | ButtonReleaseMask
|
||||||
|
| PointerMotionMask | FocusChangeMask;
|
||||||
int result =
|
int result =
|
||||||
X11_XGrabPointer(display, data->xwindow, True, 0, GrabModeAsync,
|
X11_XGrabPointer(display, data->xwindow, False, mask,
|
||||||
GrabModeAsync, data->xwindow, None, CurrentTime);
|
GrabModeAsync, GrabModeAsync, data->xwindow,
|
||||||
|
None, CurrentTime);
|
||||||
if (result == GrabSuccess) {
|
if (result == GrabSuccess) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue