Skip to content

Commit

Permalink
input-method: remove surface listener before set
Browse files Browse the repository at this point in the history
This make sure pending focused surface listener is not reachable from
old surface.
  • Loading branch information
xdavidwu committed Jan 12, 2020
1 parent 5d9a70c commit ff44c10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sway/input/text_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff44c10

Please sign in to comment.