x11: don't send raw mouse motion when the application doesn't have focus
parent
c47f9b9b54
commit
f0cd3ed330
|
@ -350,6 +350,11 @@ void X11_HandleXinput2Event(SDL_VideoDevice *_this, XGenericEventCookie *cookie)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Relative mouse motion is delivered to the window with keyboard focus */
|
||||||
|
if (!SDL_GetKeyboardFocus()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
devinfo = xinput2_get_device_info(videodata, rawev->deviceid);
|
devinfo = xinput2_get_device_info(videodata, rawev->deviceid);
|
||||||
if (!devinfo) {
|
if (!devinfo) {
|
||||||
break; /* oh well. */
|
break; /* oh well. */
|
||||||
|
|
Loading…
Reference in New Issue