mirror of
https://github.com/swaywm/sway.git
synced 2026-06-17 14:33:33 -04:00
Fix segfaut when switching focus
When focus moves away from a text input, the pop-up get reattached to the old surface during teardown, causing a null dereference in the next commit. Instead, update the client as no longer focused, and then notify the input method that the text input is no longer active. Fixes: https://github.com/swaywm/sway/issues/9187
This commit is contained in:
parent
bc278325dd
commit
20f70a94b3
1 changed files with 1 additions and 1 deletions
|
|
@ -666,8 +666,8 @@ void sway_input_method_relay_set_focus(struct sway_input_method_relay *relay,
|
|||
} else if (text_input->input->focused_surface) {
|
||||
assert(text_input->pending_focused_surface == NULL);
|
||||
if (surface != text_input->input->focused_surface) {
|
||||
relay_disable_text_input(relay, text_input);
|
||||
wlr_text_input_v3_send_leave(text_input->input);
|
||||
relay_disable_text_input(relay, text_input);
|
||||
} else {
|
||||
sway_log(SWAY_DEBUG, "IM relay set_focus already focused");
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue