debug-gui: avoid locking pointer twice

On Sway, and probably other Wayland compositors based on wlroots, the
window_lock_pointer() was called twice.

Avoid errors when window_lock_pointer() is invoked multiple times.

Fix https://gitlab.freedesktop.org/libinput/libinput/-/issues/808
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
José Expósito 2022-10-10 08:14:55 +02:00
parent 9c789cc254
commit e8732802b7

View file

@ -347,7 +347,8 @@ backend_is_x11(void)
static bool
window_lock_pointer(struct window *w)
{
w->lock_pointer.locked = false;
if (w->lock_pointer.locked)
return true;
#if HAVE_GTK_WAYLAND
if (backend_is_wayland())