input: reset mouse state on pointer leave

This commit is contained in:
Daniel Eklöf 2020-02-29 12:08:59 +01:00
parent 4ee5a81d1a
commit 1091d1c078
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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(