diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-23 23:06:50 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-23 23:06:50 +0000 |
| commit | e333bd2176ee3c9ec5aaa8864b36b9bcdf7e3b6f (patch) | |
| tree | 32d9289e551bd514f0c1f79c7e86d1ba0704f0b7 | |
| parent | wayland: change disconnected log type from err -> warn (diff) | |
input: document why wayl->focused may be NULL
| -rw-r--r-- | input.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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; } |
