wayland/surface: Keep applied sub-surface branch node linked up
Until this surface or its parent is finalized. This makes sure that any `MetaWaylandSubsurfacePlacementOp` referencing this surface for sibling will be applied as intended. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3737>
This commit is contained in:
parent
5749810ddb
commit
be4bf8da9c
1 changed files with 7 additions and 2 deletions
|
@ -701,8 +701,6 @@ meta_wayland_surface_apply_placement_ops (MetaWaylandSurface *parent,
|
|||
MetaWaylandSurface *surface = op->surface;
|
||||
GNode *sibling_node;
|
||||
|
||||
g_node_unlink (surface->applied_state.subsurface_branch_node);
|
||||
|
||||
if (!op->sibling)
|
||||
{
|
||||
surface->applied_state.parent = NULL;
|
||||
|
@ -711,6 +709,8 @@ meta_wayland_surface_apply_placement_ops (MetaWaylandSurface *parent,
|
|||
|
||||
surface->applied_state.parent = parent;
|
||||
|
||||
g_node_unlink (surface->applied_state.subsurface_branch_node);
|
||||
|
||||
if (op->sibling == parent)
|
||||
sibling_node = parent->applied_state.subsurface_leaf_node;
|
||||
else
|
||||
|
@ -1520,6 +1520,7 @@ meta_wayland_surface_finalize (GObject *object)
|
|||
{
|
||||
MetaWaylandSurface *surface = META_WAYLAND_SURFACE (object);
|
||||
MetaWaylandCompositor *compositor = surface->compositor;
|
||||
MetaWaylandSurface *subsurface_surface;
|
||||
MetaWaylandFrameCallback *cb, *next;
|
||||
|
||||
g_clear_object (&surface->scanout_candidate);
|
||||
|
@ -1555,6 +1556,10 @@ meta_wayland_surface_finalize (GObject *object)
|
|||
|
||||
meta_wayland_surface_discard_presentation_feedback (surface);
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface_surface)
|
||||
g_node_unlink (subsurface_surface->applied_state.subsurface_branch_node);
|
||||
|
||||
g_clear_pointer (&surface->applied_state.subsurface_branch_node, g_node_destroy);
|
||||
|
||||
g_hash_table_destroy (surface->shortcut_inhibited_seats);
|
||||
|
|
Loading…
Add table
Reference in a new issue