From 4be3c04999c821a601951dc47987dec1c8aa4a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 2 Jan 2020 19:30:34 +0100 Subject: [PATCH] input: keyboard-leave: move comment to where it belongs --- input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/input.c b/input.c index 9df9c5dc..7f81da8d 100644 --- a/input.c +++ b/input.c @@ -152,14 +152,14 @@ keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, stop_repeater(wayl, -1); if (old_focused != NULL) { + term_kbd_focus_out(old_focused); + term_xcursor_update(old_focused); + } else { /* * Sway bug - under certain conditions we get a * keyboard_leave() (and keyboard_key()) without first having * received a keyboard_enter() */ - term_kbd_focus_out(old_focused); - term_xcursor_update(old_focused); - } else { LOG_WARN( "compositor sent keyboard_leave event without a keyboard_enter " "event: surface=%p", surface);