From 2d470b8deb270d0649b63fea6e63e783af1e9752 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 19 Aug 2021 20:10:05 +1000 Subject: [PATCH] [client] x11: filter out virtual/grabbed XIEnterEvents --- client/displayservers/X11/x11.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index 9f3f2e3b..8f88dddd 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -975,9 +975,13 @@ static void x11XInputEvent(XGenericEventCookie *cookie) { atomic_store(&x11.lastWMEvent, microtime()); XIEnterEvent *xie = cookie->data; - if (x11.entered || xie->event != x11.window) + if (x11.entered || xie->event != x11.window || + xie->mode != XINotifyNormal) return; + if (xie->event_x < 0 || xie->event_y < 0) + DEBUG_INFO("enter %f %f", xie->event_x, xie->event_y); + app_updateCursorPos(xie->event_x, xie->event_y); app_handleEnterEvent(true); x11.entered = true;