From 9db3cd7b5184736f8384cbb32f87e8de9b79d5d1 Mon Sep 17 00:00:00 2001 From: Quantum Date: Fri, 21 May 2021 22:39:08 -0400 Subject: [PATCH] [client] wayland: avoid protocol error when warping in capture mode When using locked pointer (i.e. capture mode), it doesn't make sense to warp the cursor, so we disable it. This fixes #540. --- client/displayservers/Wayland/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/displayservers/Wayland/input.c b/client/displayservers/Wayland/input.c index 3e6fc77c..fa63805d 100644 --- a/client/displayservers/Wayland/input.c +++ b/client/displayservers/Wayland/input.c @@ -422,7 +422,7 @@ void waylandUngrabKeyboard(void) void waylandWarpPointer(int x, int y, bool exiting) { - if (!wlWm.pointerInSurface) + if (!wlWm.pointerInSurface || wlWm.lockedPointer) return; if (x < 0) x = 0;