commit 1241b42c88f0ee2f9dfabb91e41196224699be01
parent 5886187c6ef56307f15be475dc62785faf32ef35
Author: xdavidwu <xdavidwuph@gmail.com>
Date: Sun, 12 Jan 2020 10:20:32 +0800
input-method: remove surface listener before set
This make sure pending focused surface listener is not reachable from
old surface.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/sway/input/text_input.c b/sway/input/text_input.c
@@ -57,6 +57,7 @@ static void handle_im_commit(struct wl_listener *listener, void *data) {
static void text_input_set_pending_focused_surface(
struct sway_text_input *text_input, struct wlr_surface *surface) {
+ wl_list_remove(&text_input->pending_focused_surface_destroy.link);
text_input->pending_focused_surface = surface;
wl_signal_add(&surface->events.destroy,
&text_input->pending_focused_surface_destroy);