mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 11:21:28 +00:00
input-method: remove surface listener before set
This make sure pending focused surface listener is not reachable from old surface.
This commit is contained in:
parent
5886187c6e
commit
1241b42c88
|
@ -57,6 +57,7 @@ static void handle_im_commit(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
static void text_input_set_pending_focused_surface(
|
static void text_input_set_pending_focused_surface(
|
||||||
struct sway_text_input *text_input, struct wlr_surface *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;
|
text_input->pending_focused_surface = surface;
|
||||||
wl_signal_add(&surface->events.destroy,
|
wl_signal_add(&surface->events.destroy,
|
||||||
&text_input->pending_focused_surface_destroy);
|
&text_input->pending_focused_surface_destroy);
|
||||||
|
|
Loading…
Reference in a new issue