aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2024-02-17 14:47:42 +0100
committerFurkan Sahin <furkan-dev@proton.me>2024-02-17 14:47:42 +0100
commitdd8d589f85c7d0193e9d84813494dde1baf03d68 (patch)
tree7cda3ab3817b1be95d530fc169c32916396cea45
parente157fd2601e664403eec8dde1068f693d10934b5 (diff)
input/text_input: fix dangling listeners
-rw-r--r--sway/input/text_input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/input/text_input.c b/sway/input/text_input.c
index ad760a6f..5e96c3a8 100644
--- 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);