mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-01-24 05:40:39 +00:00
x11: don't send raw mouse motion when the application doesn't have focus
This commit is contained in:
@@ -350,6 +350,11 @@ void X11_HandleXinput2Event(SDL_VideoDevice *_this, XGenericEventCookie *cookie)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Relative mouse motion is delivered to the window with keyboard focus */
|
||||
if (!SDL_GetKeyboardFocus()) {
|
||||
break;
|
||||
}
|
||||
|
||||
devinfo = xinput2_get_device_info(videodata, rawev->deviceid);
|
||||
if (!devinfo) {
|
||||
break; /* oh well. */
|
||||
|
||||
Reference in New Issue
Block a user