From 5789a7efc0037845b47244574dacb9826f8974b0 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 20 Jan 2021 05:41:33 +1100 Subject: [PATCH] [client] x11: fix failure to process the correct focus events --- client/displayservers/X11/x11.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index dcf2e1ee..43bcc22f 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -335,7 +335,7 @@ static bool x11EventFilter(SDL_Event * event) return true; XIFocusOutEvent *xie = cookie->data; - if (xie->mode != NotifyNormal) + if (xie->mode != NotifyNormal && xie->mode != XINotifyWhileGrabbed) return true; app_updateCursorPos(xie->event_x, xie->event_y); @@ -350,6 +350,9 @@ static bool x11EventFilter(SDL_Event * event) return true; XIFocusOutEvent *xie = cookie->data; + if (xie->mode != NotifyNormal && xie->mode != XINotifyWhileGrabbed) + return true; + app_updateCursorPos(xie->event_x, xie->event_y); app_handleFocusEvent(false); x11.focused = false;