aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-10-12 22:45:42 +0200
committerGitHub <noreply@github.com>2018-10-12 22:45:42 +0200
commit3ceb064f022eedd808b10df6a60e3c8a06fd2b91 (patch)
tree2fed375d1adc8a33ad79b4697e99ecac5ec439cc /rootston
parent4897267bd6b16ae9caeae5d4ac5d661e60230840 (diff)
parent226eedfa2bfa5c280c5f73b0dcc7b075d7615f43 (diff)
Merge pull request #1303 from dcz-purism/fix_surface_gone
text-input: fix releasing destroy handlers
Diffstat (limited to 'rootston')
-rw-r--r--rootston/text_input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rootston/text_input.c b/rootston/text_input.c
index 84dd253e..cca64353 100644
--- a/rootston/text_input.c
+++ b/rootston/text_input.c
@@ -65,6 +65,7 @@ static void text_input_set_pending_focused_surface(
static void text_input_clear_pending_focused_surface(
struct roots_text_input *text_input) {
wl_list_remove(&text_input->pending_focused_surface_destroy.link);
+ wl_list_init(&text_input->pending_focused_surface_destroy.link);
text_input->pending_focused_surface = NULL;
}
@@ -179,7 +180,7 @@ static void handle_text_input_destroy(struct wl_listener *listener,
if (text_input->input->current_enabled) {
relay_disable_text_input(relay, text_input);
}
-
+ text_input_clear_pending_focused_surface(text_input);
wl_list_remove(&text_input->link);
text_input->input = NULL;
free(text_input);
@@ -218,6 +219,7 @@ struct roots_text_input *roots_text_input_create(
input->pending_focused_surface_destroy.notify =
handle_pending_focused_surface_destroy;
+ wl_list_init(&input->pending_focused_surface_destroy.link);
return input;
}