input: keyboard/pointer_leave: warn if we didn't see corresponding enter event

This commit is contained in:
Daniel Eklöf 2019-11-28 19:47:00 +01:00
parent a319cc813c
commit 2956a7d472
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

10
input.c
View file

@ -155,7 +155,12 @@ keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
* received a keyboard_enter()
*/
term_focus_out(wayl->focused);
} else {
LOG_WARN(
"compositor sent keyboard_leave event without a keyboard_enter "
"event: surface=%p", surface);
}
wayl->focused = NULL;
}
@ -450,6 +455,11 @@ wl_pointer_leave(void *data, struct wl_pointer *wl_pointer,
uint32_t serial, struct wl_surface *surface)
{
struct wayland *wayl = data;
if (wayl->moused == NULL) {
LOG_WARN(
"compositor sent pointer_leave event without a pointer_enter "
"event: surface=%p", surface);
}
wayl->moused = NULL;
}