[client,X11] ignore mouse events not originating in session window

This is a relaunch of d4be1717c2, which
was deleted by e136444f51.
This commit is contained in:
amazingfate 2024-11-21 18:09:00 +08:00 committed by akallabeth
parent 2779b663ff
commit 53ad1ea860

View File

@ -756,6 +756,16 @@ int xf_input_event(xfContext* xfc, const XEvent* xevent, XIDeviceEvent* event, i
WINPR_ASSERT(xevent); WINPR_ASSERT(xevent);
WINPR_ASSERT(event); WINPR_ASSERT(event);
/* When not running RAILS we only care about events for this window.
* filter out anything else, like floatbar window events
*/
const Window w = xevent->xany.window;
if (w != xfc->window)
{
if (!xfc->remote_app)
return 0;
}
settings = xfc->common.context.settings; settings = xfc->common.context.settings;
WINPR_ASSERT(settings); WINPR_ASSERT(settings);