From 53ad1ea86009c100a01ed580bb90fa2f4cc2d626 Mon Sep 17 00:00:00 2001 From: amazingfate Date: Thu, 21 Nov 2024 18:09:00 +0800 Subject: [PATCH] [client,X11] ignore mouse events not originating in session window This is a relaunch of d4be1717c23db7845d3344243cf3918cecb7b7ac, which was deleted by e136444f51b12f45f07b94953d73f04ceb0ce502. --- client/X11/xf_input.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/X11/xf_input.c b/client/X11/xf_input.c index 4127a4dc1..88b666c6e 100644 --- a/client/X11/xf_input.c +++ b/client/X11/xf_input.c @@ -756,6 +756,16 @@ int xf_input_event(xfContext* xfc, const XEvent* xevent, XIDeviceEvent* event, i WINPR_ASSERT(xevent); 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; WINPR_ASSERT(settings);