Revert "wayland/subsurface: Drop unapplied subsurface state on unmap"
This reverts commit35d92e0fac
. This turned out to cause trouble, because it can prevent MetaWaylandSurface::applied_state.subsurface_branch_node from ever getting linked up for a sub-surface. It shouldn't be necessary anyway, since permanently_unmap_subsurface / wl_subcompositor_get_subsurface reset the sub-surface state as defined by the protocol. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3737> (cherry picked from commit5749810ddb
)
This commit is contained in:
parent
37d1af515d
commit
3df53268ab
4 changed files with 0 additions and 70 deletions
|
@ -407,38 +407,11 @@ wl_subsurface_place_below (struct wl_client *client,
|
|||
META_WAYLAND_SUBSURFACE_PLACEMENT_BELOW);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_subsurface_drop_placement_ops (MetaWaylandSurfaceState *state,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
GSList **list = &state->subsurface_placement_ops;
|
||||
GSList *link = *list;
|
||||
|
||||
while (link)
|
||||
{
|
||||
MetaWaylandSubsurfacePlacementOp *op = link->data;
|
||||
|
||||
if (op->surface == surface)
|
||||
{
|
||||
meta_wayland_subsurface_destroy_placement_op (op);
|
||||
*list = g_slist_delete_link (*list, link);
|
||||
}
|
||||
else
|
||||
{
|
||||
list = &link->next;
|
||||
}
|
||||
|
||||
link = *list;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
permanently_unmap_subsurface (MetaWaylandSurface *surface)
|
||||
{
|
||||
MetaWaylandSubsurfacePlacementOp *op;
|
||||
MetaWaylandTransaction *transaction;
|
||||
MetaWaylandSurface *parent;
|
||||
MetaWaylandSurfaceState *pending_state;
|
||||
|
||||
op = get_subsurface_placement_op (surface, NULL,
|
||||
META_WAYLAND_SUBSURFACE_PLACEMENT_BELOW);
|
||||
|
@ -449,24 +422,6 @@ permanently_unmap_subsurface (MetaWaylandSurface *surface)
|
|||
meta_wayland_transaction_add_subsurface_position (transaction, surface, 0, 0);
|
||||
meta_wayland_transaction_commit (transaction);
|
||||
|
||||
if (surface->sub.transaction)
|
||||
meta_wayland_transaction_drop_subsurface_state (surface->sub.transaction,
|
||||
surface);
|
||||
|
||||
parent = surface->committed_state.parent;
|
||||
pending_state = meta_wayland_surface_get_pending_state (parent);
|
||||
if (pending_state && pending_state->subsurface_placement_ops)
|
||||
meta_wayland_subsurface_drop_placement_ops (pending_state, surface);
|
||||
|
||||
while (parent)
|
||||
{
|
||||
if (parent->sub.transaction)
|
||||
meta_wayland_transaction_drop_subsurface_state (parent->sub.transaction,
|
||||
surface);
|
||||
|
||||
parent = parent->committed_state.parent;
|
||||
}
|
||||
|
||||
surface->committed_state.parent = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,6 @@ void meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface,
|
|||
|
||||
void meta_wayland_subsurface_destroy_placement_op (MetaWaylandSubsurfacePlacementOp *op);
|
||||
|
||||
void meta_wayland_subsurface_drop_placement_ops (MetaWaylandSurfaceState *state,
|
||||
MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_subsurface_parent_destroyed (MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_subsurfaces_init (MetaWaylandCompositor *compositor);
|
||||
|
|
|
@ -102,25 +102,6 @@ meta_wayland_transaction_apply_subsurface_position (MetaWaylandSurface
|
|||
surface->sub.y = entry->y;
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_transaction_drop_subsurface_state (MetaWaylandTransaction *transaction,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
MetaWaylandSurface *parent = surface->committed_state.parent;
|
||||
MetaWaylandTransactionEntry *entry;
|
||||
|
||||
entry = meta_wayland_transaction_get_entry (transaction, surface);
|
||||
if (entry)
|
||||
entry->has_sub_pos = FALSE;
|
||||
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
entry = meta_wayland_transaction_get_entry (transaction, parent);
|
||||
if (entry && entry->state && entry->state->subsurface_placement_ops)
|
||||
meta_wayland_subsurface_drop_placement_ops (entry->state, surface);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_ancestor (MetaWaylandSurface *candidate,
|
||||
MetaWaylandSurface *reference)
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
#include "wayland/meta-wayland-types.h"
|
||||
#include "wayland/meta-wayland-subsurface.h"
|
||||
|
||||
void meta_wayland_transaction_drop_subsurface_state (MetaWaylandTransaction *transaction,
|
||||
MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_transaction_commit (MetaWaylandTransaction *transaction);
|
||||
|
||||
MetaWaylandTransactionEntry *meta_wayland_transaction_ensure_entry (MetaWaylandTransaction *transaction,
|
||||
|
|
Loading…
Reference in a new issue