xdg_shell/xwayland: unlink listeners on destroy

This commit is contained in:
Jente Hidskes 2019-01-20 13:41:35 +01:00
parent 2387bce647
commit e9139f08e3
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA
2 changed files with 10 additions and 0 deletions

View file

@ -91,6 +91,11 @@ static void
handle_xdg_shell_surface_destroy(struct wl_listener *listener, void *data)
{
struct cg_view *view = wl_container_of(listener, view, destroy);
wl_list_remove(&view->map.link);
wl_list_remove(&view->unmap.link);
wl_list_remove(&view->destroy.link);
view_destroy(view);
}

View file

@ -87,6 +87,11 @@ static void
handle_xwayland_surface_destroy(struct wl_listener *listener, void *data)
{
struct cg_view *view = wl_container_of(listener, view, destroy);
wl_list_remove(&view->map.link);
wl_list_remove(&view->unmap.link);
wl_list_remove(&view->destroy.link);
view_destroy(view);
}