diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-01-26 13:48:42 -0700 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-01-26 13:48:42 -0700 |
| commit | e378586bcc15ebf10a5a83699a36b889c0aa2d37 (patch) | |
| tree | f35edf051a77b7b38e46cbe79f02dbfe14c9baa2 | |
| parent | 04116345412a334c13f9e09dcb1990e282c5f1c9 (diff) | |
text_input: Ignore text_input disable from unfocused windows
Before this commit, there would be cases where focus changes from one
window to another, the new window activates text_input, then the old
window sends a deactivate request, making text_input unfocused
completely.
| -rw-r--r-- | sway/input/text_input.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/text_input.c b/sway/input/text_input.c index f83726ee..70659712 100644 --- a/sway/input/text_input.c +++ b/sway/input/text_input.c @@ -144,6 +144,10 @@ static void handle_text_input_disable(struct wl_listener *listener, void *data) { struct sway_text_input *text_input = wl_container_of(listener, text_input, text_input_disable); + if (text_input->input->focused_surface == NULL) { + sway_log(SWAY_DEBUG, "Disabling text input, but no longer focused"); + return; + } relay_disable_text_input(text_input->relay, text_input); } |
