mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 16:06:37 +01:00
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.
This commit is contained in:
parent
31a01bb80d
commit
b0e8f4ade2
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue