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:
Sam Lantinga
2025-01-31 23:45:09 -08:00
parent 69d361dee1
commit bc3264130d

View File

@@ -1614,7 +1614,7 @@ static void X11_DispatchEvent(SDL_VideoDevice *_this, XEvent *xevent)
case MotionNotify:
{
if (data->xinput2_mouse_enabled) {
if (data->xinput2_mouse_enabled && !data->mouse_grabbed) {
// This input is being handled by XInput2
break;
}