mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Fixed mouse motion events while the mouse is grabbed
When the mouse is grabbed, the X server sends mouse events only to the grabbing client, and XInput2 events for the master device are not delivered. We should consider using the window mouse rect confinement instead of a true X server grab for SDL mouse grab functionality.
This commit is contained in:
@@ -1614,7 +1614,7 @@ static void X11_DispatchEvent(SDL_VideoDevice *_this, XEvent *xevent)
|
|||||||
|
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
{
|
{
|
||||||
if (data->xinput2_mouse_enabled) {
|
if (data->xinput2_mouse_enabled && !data->mouse_grabbed) {
|
||||||
// This input is being handled by XInput2
|
// This input is being handled by XInput2
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user