mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
input: document why wayl->focused may be NULL
This commit is contained in:
parent
721ac4ab31
commit
e333bd2176
1 changed files with 7 additions and 1 deletions
8
input.c
8
input.c
|
|
@ -142,8 +142,14 @@ keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
|
|||
wayl_terminal_from_surface(wayl, surface) == wayl->focused);
|
||||
|
||||
stop_repeater(wayl, -1);
|
||||
if (wayl->focused != NULL)
|
||||
if (wayl->focused != NULL) {
|
||||
/*
|
||||
* Sway bug - under certain conditions we get a
|
||||
* keyboard_leave() (and keyboard_key()) without first having
|
||||
* received a keyboard_enter()
|
||||
*/
|
||||
term_focus_out(wayl->focused);
|
||||
}
|
||||
wayl->focused = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue