From d9ffb98c9b782b7a617ab223a3db4b7082a80ad2 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 18 Sep 2022 22:05:13 -0400 Subject: [PATCH] [client] wayland: fix attempt to confine when pointer is locked This fixes the following crash when attempt to toggle capture at the right after closing the overlay: zwp_pointer_constraints_v1@12: error 1: a pointer constraint with a wl_pointer of the same wl_seat is already on this surface --- 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 816ae2ef..56cf4778 100644 --- a/client/displayservers/Wayland/input.c +++ b/client/displayservers/Wayland/input.c @@ -465,7 +465,7 @@ void waylandGrabPointer(void) INTERLOCKED_SECTION(wlWm.confineLock, { - if (!wlWm.confinedPointer) + if (!wlWm.confinedPointer && !wlWm.lockedPointer) { wlWm.confinedPointer = zwp_pointer_constraints_v1_confine_pointer( wlWm.pointerConstraints, wlWm.surface, wlWm.pointer, NULL,