wayland: Ensure to unlink destroy listeners for subsurfaces
There is some surface tracking going on here, and all notify handlers are possibly leaving the linked wl_listener behind. Ensure it is unlinked in all destroy notification functions. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2588>
This commit is contained in:
parent
51064c1b4e
commit
f4f39d3a2c
@ -342,6 +342,7 @@ subsurface_handle_pending_subsurface_destroyed (struct wl_listener *listener,
|
|||||||
wl_container_of (listener, op, subsurface_destroy_listener);
|
wl_container_of (listener, op, subsurface_destroy_listener);
|
||||||
|
|
||||||
op->surface = NULL;
|
op->surface = NULL;
|
||||||
|
wl_list_remove (&op->subsurface_destroy_listener.link);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -352,6 +353,7 @@ subsurface_handle_pending_sibling_destroyed (struct wl_listener *listener,
|
|||||||
wl_container_of (listener, op, sibling_destroy_listener);
|
wl_container_of (listener, op, sibling_destroy_listener);
|
||||||
|
|
||||||
op->sibling = NULL;
|
op->sibling = NULL;
|
||||||
|
wl_list_remove (&op->sibling_destroy_listener.link);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -487,6 +489,7 @@ surface_handle_parent_surface_destroyed (struct wl_listener *listener,
|
|||||||
|
|
||||||
g_node_unlink (surface->subsurface_branch_node);
|
g_node_unlink (surface->subsurface_branch_node);
|
||||||
surface->sub.parent = NULL;
|
surface->sub.parent = NULL;
|
||||||
|
wl_list_remove (&surface->sub.parent_destroy_listener.link);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user