commit 07b059852673cd9e148c2adfc6bb4f8a0d0ff315
parent d6150b6bb05ff9f59c0162fc2bab1709545fae7f
Author: Simon Ser <contact@emersion.fr>
Date: Sat, 17 Feb 2024 14:47:42 +0100
input/text_input: fix dangling listeners
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/sway/input/text_input.c b/sway/input/text_input.c
@@ -109,6 +109,9 @@ static void handle_im_destroy(struct wl_listener *listener, void *data) {
input_method_destroy);
struct wlr_input_method_v2 *context = data;
assert(context == relay->input_method);
+ wl_list_remove(&relay->input_method_commit.link);
+ wl_list_remove(&relay->input_method_grab_keyboard.link);
+ wl_list_remove(&relay->input_method_destroy.link);
wl_list_remove(&relay->input_method_new_popup_surface.link);
relay->input_method = NULL;
struct sway_text_input *text_input = relay_get_focused_text_input(relay);