diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2020-06-13 00:52:26 +0200 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2020-06-13 00:52:26 +0200 |
| commit | 010e47c949faa929f71bebf747ae377627ab0d39 (patch) | |
| tree | dc1b40ed102fcd282dcee411b90ab38b47004e3b | |
| parent | 419e74152689635bb3f097a2ae515735d48e2321 (diff) | |
Remove view child surface_{map,unmap} listeners on destroy
| -rw-r--r-- | sway/tree/view.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index ec481596..ca5af10e 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -917,7 +917,9 @@ void view_child_init(struct sway_view_child *child, // Not all child views have a map/unmap event child->surface_map.notify = view_child_handle_surface_map; + wl_list_init(&child->surface_map.link); child->surface_unmap.notify = view_child_handle_surface_unmap; + wl_list_init(&child->surface_unmap.link); wl_signal_add(&view->events.unmap, &child->view_unmap); child->view_unmap.notify = view_child_handle_view_unmap; @@ -948,6 +950,8 @@ void view_child_destroy(struct sway_view_child *child) { wl_list_remove(&child->surface_commit.link); wl_list_remove(&child->surface_destroy.link); + wl_list_remove(&child->surface_map.link); + wl_list_remove(&child->surface_unmap.link); wl_list_remove(&child->view_unmap.link); wl_list_remove(&child->surface_new_subsurface.link); |
