diff options
author | Andri Yngvason <andri@yngvason.is> | 2020-12-28 02:07:41 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-01-01 19:02:56 +0100 |
commit | 98eece53ad87dd3b9a9c96df0714683e12dafe44 (patch) | |
tree | 7c4f9c3579c3fb68d55e1fe9ab8ce6b661100dc1 /sway/input/text_input.c | |
parent | 53f5197c26f1ea88f004a6c19504bd8f25b85462 (diff) |
input: Clean up input_method_relay in seat_destoy()
This fixes a crash that happens when input_method_new or text_method_new
events are emitted after the seat has been freed.
Diffstat (limited to 'sway/input/text_input.c')
-rw-r--r-- | sway/input/text_input.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/input/text_input.c b/sway/input/text_input.c index 2fb25eef..f83726ee 100644 --- a/sway/input/text_input.c +++ b/sway/input/text_input.c @@ -263,6 +263,11 @@ void sway_input_method_relay_init(struct sway_seat *seat, &relay->input_method_new); } +void sway_input_method_relay_finish(struct sway_input_method_relay *relay) { + wl_list_remove(&relay->input_method_new.link); + wl_list_remove(&relay->text_input_new.link); +} + void sway_input_method_relay_set_focus(struct sway_input_method_relay *relay, struct wlr_surface *surface) { struct sway_text_input *text_input; |