From e6805ce6e9a7412bf9f4a92c2d042e4545bed817 Mon Sep 17 00:00:00 2001 From: xdavidwu Date: Sun, 12 Jan 2020 19:49:19 +0800 Subject: [PATCH] im: remove listener on pending surface destoryed --- sway/input/text_input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sway/input/text_input.c b/sway/input/text_input.c index a59fd16a..b5b50220 100644 --- a/sway/input/text_input.c +++ b/sway/input/text_input.c @@ -174,6 +174,8 @@ static void handle_pending_focused_surface_destroy(struct wl_listener *listener, struct wlr_surface *surface = data; assert(text_input->pending_focused_surface == surface); text_input->pending_focused_surface = NULL; + wl_list_remove(&text_input->pending_focused_surface_destroy.link); + wl_list_init(&text_input->pending_focused_surface_destroy.link); } struct sway_text_input *sway_text_input_create(