From 1091d1c0785cd07f2cb96fe88b9ccd0d331ede01 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 29 Feb 2020 12:08:59 +0100 Subject: input: reset mouse state on pointer leave --- input.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'input.c') diff --git a/input.c b/input.c index 9f57307b..6a2bd0bf 100644 --- a/input.c +++ b/input.c @@ -734,6 +734,9 @@ wl_pointer_leave(void *data, struct wl_pointer *wl_pointer, wayl->pointer.xcursor = NULL; } + /* Reset mouse state */ + memset(&wayl->mouse, 0, sizeof(wayl->mouse)); + wayl->mouse_focus = NULL; if (old_moused == NULL) { LOG_WARN( -- cgit v1.3