From 4f64541b46410b2996191c9c6b7bbe1e8bdc6808 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 5 Mar 2025 16:23:53 +0800 Subject: [PATCH] fix: crash when exit fcitx5 --- IM.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IM.h b/IM.h index e0b415ee..f1bd9ad7 100644 --- a/IM.h +++ b/IM.h @@ -238,6 +238,11 @@ static void handle_im_destroy(struct wl_listener *listener, void *data) { struct wlr_input_method_v2 *context = data; wlr_log(WLR_INFO, "IM destroy"); 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; text_input = relay_get_focused_text_input(relay);