mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
wayland/subsurface: Handle node unlinking on parent destroyed
It concerns subsurface state and the subsurface already listenes for the parent to get destroyed. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1958>
This commit is contained in:
parent
2a2f9300d0
commit
f41696b0fc
@ -502,6 +502,7 @@ surface_handle_parent_surface_destroyed (struct wl_listener *listener,
|
|||||||
surface,
|
surface,
|
||||||
sub.parent_destroy_listener);
|
sub.parent_destroy_listener);
|
||||||
|
|
||||||
|
g_node_unlink (surface->subsurface_branch_node);
|
||||||
surface->sub.parent = NULL;
|
surface->sub.parent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1415,13 +1415,6 @@ meta_wayland_surface_notify_unmapped (MetaWaylandSurface *surface)
|
|||||||
g_signal_emit (surface, surface_signals[SURFACE_UNMAPPED], 0);
|
g_signal_emit (surface, surface_signals[SURFACE_UNMAPPED], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
unlink_note (GNode *node,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
g_node_unlink (node);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
wl_surface_destructor (struct wl_resource *resource)
|
wl_surface_destructor (struct wl_resource *resource)
|
||||||
{
|
{
|
||||||
@ -1474,14 +1467,7 @@ wl_surface_destructor (struct wl_resource *resource)
|
|||||||
if (surface->wl_subsurface)
|
if (surface->wl_subsurface)
|
||||||
wl_resource_destroy (surface->wl_subsurface);
|
wl_resource_destroy (surface->wl_subsurface);
|
||||||
|
|
||||||
if (surface->subsurface_branch_node)
|
g_clear_pointer (&surface->subsurface_branch_node, g_node_destroy);
|
||||||
{
|
|
||||||
g_node_children_foreach (surface->subsurface_branch_node,
|
|
||||||
G_TRAVERSE_NON_LEAVES,
|
|
||||||
unlink_note,
|
|
||||||
NULL);
|
|
||||||
g_clear_pointer (&surface->subsurface_branch_node, g_node_destroy);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_hash_table_destroy (surface->shortcut_inhibited_seats);
|
g_hash_table_destroy (surface->shortcut_inhibited_seats);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user