mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
input: may get keyboard_exit() event with no focused terminal
This happens on Sway when exiting a screen locker. Or at least that's when we see the problem; it's unclear if the event occurs when starting the screen locker, or when exiting it. Or maybe its both. Anyway, don't try to unfocus a NULL-terminal.
This commit is contained in:
parent
55a23a5b29
commit
8c945c9832
1 changed files with 5 additions and 1 deletions
6
input.c
6
input.c
|
|
@ -138,8 +138,12 @@ 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);
|
||||
|
||||
stop_repeater(wayl, -1);
|
||||
term_focus_out(wayl->focused);
|
||||
if (wayl->focused != NULL)
|
||||
term_focus_out(wayl->focused);
|
||||
wayl->focused = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue