input: sway 1.2 bug: keyboard_leave() called with surface == NULL

This commit is contained in:
Daniel Eklöf 2019-11-28 19:24:16 +01:00
parent b96fb2ddab
commit 9efa28b4c6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -138,8 +138,10 @@ keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
{
struct wayland *wayl = data;
assert(wayl->focused == NULL ||
wayl_terminal_from_surface(wayl, surface) == wayl->focused);
assert(
wayl->focused == NULL ||
surface == NULL || /* Seen on Sway 1.2 */
wayl_terminal_from_surface(wayl, surface) == wayl->focused);
stop_repeater(wayl, -1);
if (wayl->focused != NULL) {