From 88a95aeab06a96e8bc36f6409587f5584a2dbd33 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 10 Dec 2021 05:27:33 +1100 Subject: [PATCH] [client] x11: fix issue with grab when clicking on the unfocused window Fixes #856 --- client/displayservers/X11/x11.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 5099c949..18ae2398 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -993,8 +993,10 @@ static void x11XInputEvent(XGenericEventCookie *cookie) { atomic_store(&x11.lastWMEvent, microtime()); XILeaveEvent *xie = cookie->data; + if (!x11.entered || xie->event != x11.window || - button_state != 0 || app_isCaptureMode()) + button_state != 0 || app_isCaptureMode() || + xie->mode == NotifyGrab) return; app_updateCursorPos(xie->event_x, xie->event_y);