mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 16:01:27 +00:00
Remove view child surface_{map,unmap} listeners on destroy
This commit is contained in:
parent
90d936d4ad
commit
f9361ae36c
|
@ -917,7 +917,9 @@ void view_child_init(struct sway_view_child *child,
|
||||||
|
|
||||||
// Not all child views have a map/unmap event
|
// Not all child views have a map/unmap event
|
||||||
child->surface_map.notify = view_child_handle_surface_map;
|
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;
|
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);
|
wl_signal_add(&view->events.unmap, &child->view_unmap);
|
||||||
child->view_unmap.notify = view_child_handle_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_commit.link);
|
||||||
wl_list_remove(&child->surface_destroy.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->view_unmap.link);
|
||||||
wl_list_remove(&child->surface_new_subsurface.link);
|
wl_list_remove(&child->surface_new_subsurface.link);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue