diff options
author | José Expósito <jose.exposito89@gmail.com> | 2022-10-10 08:14:55 +0200 |
---|---|---|
committer | José Expósito <jose.exposito89@gmail.com> | 2022-10-10 08:46:30 +0000 |
commit | e8732802b7a3a45194be242a02ead13027c7fd73 (patch) | |
tree | aacb9c4531546800e54ad3c4b24bd3edae0338e0 | |
parent | 9c789cc25408d36833768c762ae51eedbd7d09c9 (diff) | |
download | libinput-e8732802b7a3a45194be242a02ead13027c7fd73.tar.gz |
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>
-rw-r--r-- | tools/libinput-debug-gui.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libinput-debug-gui.c b/tools/libinput-debug-gui.c index 309c0450..60df2ae5 100644 --- a/tools/libinput-debug-gui.c +++ b/tools/libinput-debug-gui.c @@ -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()) |