mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
wayland/surface: Rename output/protocol_state to applied/committed_state
This is more consistent with Wayland protocol spec language. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3395>
This commit is contained in:
parent
31c5525382
commit
ca5bf847ee
@ -184,8 +184,8 @@ meta_surface_actor_wayland_apply_transform (ClutterActor *actor,
|
||||
goto out;
|
||||
|
||||
root_surface = surface;
|
||||
while (root_surface->output_state.parent)
|
||||
root_surface = root_surface->output_state.parent;
|
||||
while (root_surface->applied_state.parent)
|
||||
root_surface = root_surface->applied_state.parent;
|
||||
|
||||
window = meta_wayland_surface_get_window (root_surface);
|
||||
if (!window)
|
||||
@ -227,7 +227,7 @@ meta_surface_actor_wayland_apply_transform (ClutterActor *actor,
|
||||
adj_actor_x += roundf (surface->sub.x * scale) / scale;
|
||||
adj_actor_y += roundf (surface->sub.y * scale) / scale;
|
||||
|
||||
surface = surface->output_state.parent;
|
||||
surface = surface->applied_state.parent;
|
||||
}
|
||||
while (surface);
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ meta_window_actor_wayland_rebuild_surface_tree (MetaWindowActor *actor)
|
||||
meta_window_actor_get_surface (actor);
|
||||
MetaWaylandSurface *surface = meta_surface_actor_wayland_get_surface (
|
||||
META_SURFACE_ACTOR_WAYLAND (surface_actor));
|
||||
GNode *root_node = surface->output_state.subsurface_branch_node;
|
||||
GNode *root_node = surface->applied_state.subsurface_branch_node;
|
||||
g_autoptr (GList) surface_actors = NULL;
|
||||
g_autoptr (GList) children = NULL;
|
||||
GList *l;
|
||||
|
@ -275,7 +275,7 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
|
||||
|
||||
meta_shaped_texture_ensure_size_valid (stex);
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface_surface)
|
||||
{
|
||||
MetaWaylandActorSurface *actor_surface;
|
||||
@ -424,7 +424,7 @@ meta_wayland_actor_surface_reset_actor (MetaWaylandActorSurface *actor_surface)
|
||||
meta_wayland_surface_role_get_surface (META_WAYLAND_SURFACE_ROLE (actor_surface));
|
||||
MetaWaylandSurface *subsurface_surface;
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface_surface)
|
||||
{
|
||||
MetaWaylandActorSurface *actor_surface;
|
||||
|
@ -1383,7 +1383,7 @@ pointer_can_grab_surface (MetaWaylandPointer *pointer,
|
||||
if (pointer->focus_surface == surface)
|
||||
return TRUE;
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface)
|
||||
{
|
||||
if (pointer_can_grab_surface (pointer, subsurface))
|
||||
|
@ -58,7 +58,7 @@ meta_wayland_shell_surface_calculate_geometry (MetaWaylandShellSurface *shell_su
|
||||
.height = meta_wayland_surface_get_height (surface),
|
||||
};
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface_surface)
|
||||
{
|
||||
MetaWaylandSubsurface *subsurface;
|
||||
|
@ -48,7 +48,7 @@ transform_subsurface_position (MetaWaylandSurface *surface,
|
||||
*x += surface->sub.x;
|
||||
*y += surface->sub.y;
|
||||
|
||||
surface = surface->output_state.parent;
|
||||
surface = surface->applied_state.parent;
|
||||
}
|
||||
while (surface);
|
||||
}
|
||||
@ -58,8 +58,8 @@ should_show (MetaWaylandSurface *surface)
|
||||
{
|
||||
if (!surface->buffer)
|
||||
return FALSE;
|
||||
else if (surface->output_state.parent)
|
||||
return should_show (surface->output_state.parent);
|
||||
else if (surface->applied_state.parent)
|
||||
return should_show (surface->applied_state.parent);
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
@ -96,7 +96,7 @@ static gboolean
|
||||
is_child (MetaWaylandSurface *surface,
|
||||
MetaWaylandSurface *sibling)
|
||||
{
|
||||
return surface->protocol_state.parent == sibling;
|
||||
return surface->committed_state.parent == sibling;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -104,7 +104,7 @@ is_sibling (MetaWaylandSurface *surface,
|
||||
MetaWaylandSurface *sibling)
|
||||
{
|
||||
return surface != sibling &&
|
||||
surface->protocol_state.parent == sibling->protocol_state.parent;
|
||||
surface->committed_state.parent == sibling->committed_state.parent;
|
||||
}
|
||||
|
||||
void
|
||||
@ -129,7 +129,7 @@ meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface,
|
||||
if (surface->buffer)
|
||||
mtk_rectangle_union (out_geometry, &geometry, out_geometry);
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface_surface)
|
||||
{
|
||||
MetaWaylandSubsurface *subsurface;
|
||||
@ -160,7 +160,7 @@ meta_wayland_subsurface_get_toplevel (MetaWaylandSurfaceRole *surface_role)
|
||||
{
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWaylandSurface *parent = surface->output_state.parent;
|
||||
MetaWaylandSurface *parent = surface->applied_state.parent;
|
||||
|
||||
if (parent)
|
||||
return meta_wayland_surface_get_toplevel (parent);
|
||||
@ -175,7 +175,7 @@ meta_wayland_subsurface_get_window (MetaWaylandSurfaceRole *surface_role)
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWaylandSurface *parent;
|
||||
|
||||
parent = surface->protocol_state.parent;
|
||||
parent = surface->committed_state.parent;
|
||||
if (parent)
|
||||
return meta_wayland_surface_get_window (parent);
|
||||
else
|
||||
@ -192,7 +192,7 @@ meta_wayland_subsurface_is_synchronized (MetaWaylandSurfaceRole *surface_role)
|
||||
if (surface->sub.synchronous)
|
||||
return TRUE;
|
||||
|
||||
parent = surface->protocol_state.parent;
|
||||
parent = surface->committed_state.parent;
|
||||
if (parent)
|
||||
return meta_wayland_surface_is_synchronized (parent);
|
||||
|
||||
@ -204,7 +204,7 @@ meta_wayland_subsurface_notify_subsurface_state_changed (MetaWaylandSurfaceRole
|
||||
{
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWaylandSurface *parent = surface->output_state.parent;
|
||||
MetaWaylandSurface *parent = surface->applied_state.parent;
|
||||
|
||||
if (parent)
|
||||
return meta_wayland_surface_notify_subsurface_state_changed (parent);
|
||||
@ -217,14 +217,14 @@ meta_wayland_subsurface_get_geometry_scale (MetaWaylandActorSurface *actor_surfa
|
||||
META_WAYLAND_SURFACE_ROLE (actor_surface);
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWaylandSurface *parent = surface->output_state.parent;
|
||||
MetaWaylandSurface *parent = surface->applied_state.parent;
|
||||
|
||||
if (parent)
|
||||
{
|
||||
MetaWaylandActorSurface *parent_actor;
|
||||
|
||||
parent_actor =
|
||||
META_WAYLAND_ACTOR_SURFACE (surface->output_state.parent->role);
|
||||
META_WAYLAND_ACTOR_SURFACE (surface->applied_state.parent->role);
|
||||
return meta_wayland_actor_surface_get_geometry_scale (parent_actor);
|
||||
}
|
||||
else
|
||||
@ -311,7 +311,7 @@ get_subsurface_placement_op (MetaWaylandSurface *surface,
|
||||
MetaWaylandSurface *sibling,
|
||||
MetaWaylandSubsurfacePlacement placement)
|
||||
{
|
||||
MetaWaylandSurface *parent = surface->protocol_state.parent;
|
||||
MetaWaylandSurface *parent = surface->committed_state.parent;
|
||||
MetaWaylandSubsurfacePlacementOp *op =
|
||||
g_new0 (MetaWaylandSubsurfacePlacementOp, 1);
|
||||
GNode *sibling_node;
|
||||
@ -320,27 +320,27 @@ get_subsurface_placement_op (MetaWaylandSurface *surface,
|
||||
op->sibling = sibling;
|
||||
op->surface = surface;
|
||||
|
||||
g_node_unlink (surface->protocol_state.subsurface_branch_node);
|
||||
g_node_unlink (surface->committed_state.subsurface_branch_node);
|
||||
|
||||
if (!sibling)
|
||||
return op;
|
||||
|
||||
if (sibling == parent)
|
||||
sibling_node = parent->protocol_state.subsurface_leaf_node;
|
||||
sibling_node = parent->committed_state.subsurface_leaf_node;
|
||||
else
|
||||
sibling_node = sibling->protocol_state.subsurface_branch_node;
|
||||
sibling_node = sibling->committed_state.subsurface_branch_node;
|
||||
|
||||
switch (placement)
|
||||
{
|
||||
case META_WAYLAND_SUBSURFACE_PLACEMENT_ABOVE:
|
||||
g_node_insert_after (parent->protocol_state.subsurface_branch_node,
|
||||
g_node_insert_after (parent->committed_state.subsurface_branch_node,
|
||||
sibling_node,
|
||||
surface->protocol_state.subsurface_branch_node);
|
||||
surface->committed_state.subsurface_branch_node);
|
||||
break;
|
||||
case META_WAYLAND_SUBSURFACE_PLACEMENT_BELOW:
|
||||
g_node_insert_before (parent->protocol_state.subsurface_branch_node,
|
||||
g_node_insert_before (parent->committed_state.subsurface_branch_node,
|
||||
sibling_node,
|
||||
surface->protocol_state.subsurface_branch_node);
|
||||
surface->committed_state.subsurface_branch_node);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -374,7 +374,7 @@ subsurface_place (struct wl_client *client,
|
||||
placement);
|
||||
|
||||
pending_state =
|
||||
meta_wayland_surface_get_pending_state (surface->protocol_state.parent);
|
||||
meta_wayland_surface_get_pending_state (surface->committed_state.parent);
|
||||
pending_state->subsurface_placement_ops =
|
||||
g_slist_append (pending_state->subsurface_placement_ops, op);
|
||||
}
|
||||
@ -435,7 +435,7 @@ permanently_unmap_subsurface (MetaWaylandSurface *surface)
|
||||
|
||||
transaction = meta_wayland_transaction_new (surface->compositor);
|
||||
meta_wayland_transaction_add_placement_op (transaction,
|
||||
surface->protocol_state.parent, op);
|
||||
surface->committed_state.parent, op);
|
||||
meta_wayland_transaction_add_subsurface_position (transaction, surface, 0, 0);
|
||||
meta_wayland_transaction_commit (transaction);
|
||||
|
||||
@ -443,7 +443,7 @@ permanently_unmap_subsurface (MetaWaylandSurface *surface)
|
||||
meta_wayland_transaction_drop_subsurface_state (surface->sub.transaction,
|
||||
surface);
|
||||
|
||||
parent = surface->protocol_state.parent;
|
||||
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);
|
||||
@ -454,10 +454,10 @@ permanently_unmap_subsurface (MetaWaylandSurface *surface)
|
||||
meta_wayland_transaction_drop_subsurface_state (parent->sub.transaction,
|
||||
surface);
|
||||
|
||||
parent = parent->protocol_state.parent;
|
||||
parent = parent->committed_state.parent;
|
||||
}
|
||||
|
||||
surface->protocol_state.parent = NULL;
|
||||
surface->committed_state.parent = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -465,7 +465,7 @@ wl_subsurface_destructor (struct wl_resource *resource)
|
||||
{
|
||||
MetaWaylandSurface *surface = wl_resource_get_user_data (resource);
|
||||
|
||||
if (surface->protocol_state.parent)
|
||||
if (surface->committed_state.parent)
|
||||
permanently_unmap_subsurface (surface);
|
||||
|
||||
surface->wl_subsurface = NULL;
|
||||
@ -491,7 +491,7 @@ meta_wayland_subsurface_parent_desynced (MetaWaylandSurface *surface)
|
||||
if (surface->sub.transaction)
|
||||
meta_wayland_transaction_commit (g_steal_pointer (&surface->sub.transaction));
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->protocol_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->committed_state,
|
||||
subsurface_surface)
|
||||
meta_wayland_subsurface_parent_desynced (subsurface_surface);
|
||||
}
|
||||
@ -539,8 +539,8 @@ is_same_or_ancestor (MetaWaylandSurface *surface,
|
||||
{
|
||||
if (surface == other_surface)
|
||||
return TRUE;
|
||||
if (other_surface->protocol_state.parent)
|
||||
return is_same_or_ancestor (surface, other_surface->protocol_state.parent);
|
||||
if (other_surface->committed_state.parent)
|
||||
return is_same_or_ancestor (surface, other_surface->committed_state.parent);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -602,12 +602,12 @@ wl_subcompositor_get_subsurface (struct wl_client *client,
|
||||
wl_subsurface_destructor);
|
||||
|
||||
surface->sub.synchronous = TRUE;
|
||||
surface->protocol_state.parent = parent;
|
||||
surface->committed_state.parent = parent;
|
||||
|
||||
meta_wayland_surface_notify_highest_scale_monitor (surface);
|
||||
|
||||
reference =
|
||||
g_node_last_child (parent->protocol_state.subsurface_branch_node)->data;
|
||||
g_node_last_child (parent->committed_state.subsurface_branch_node)->data;
|
||||
op = get_subsurface_placement_op (surface, reference,
|
||||
META_WAYLAND_SUBSURFACE_PLACEMENT_ABOVE);
|
||||
|
||||
|
@ -187,7 +187,7 @@ struct _MetaWaylandSurface
|
||||
GNode *subsurface_branch_node;
|
||||
GNode *subsurface_leaf_node;
|
||||
MetaMultiTexture *texture;
|
||||
} output_state, protocol_state;
|
||||
} applied_state, committed_state;
|
||||
|
||||
/* Extension resources. */
|
||||
struct wl_resource *wl_subsurface;
|
||||
|
@ -348,7 +348,7 @@ surface_process_damage (MetaWaylandSurface *surface,
|
||||
|
||||
mtk_region_intersect_rectangle (buffer_region, &buffer_rect);
|
||||
|
||||
meta_wayland_buffer_process_damage (buffer, surface->output_state.texture,
|
||||
meta_wayland_buffer_process_damage (buffer, surface->applied_state.texture,
|
||||
buffer_region);
|
||||
|
||||
actor = meta_wayland_surface_get_actor (surface);
|
||||
@ -660,32 +660,32 @@ meta_wayland_surface_apply_placement_ops (MetaWaylandSurface *parent,
|
||||
MetaWaylandSurface *surface = op->surface;
|
||||
GNode *sibling_node;
|
||||
|
||||
g_node_unlink (surface->output_state.subsurface_branch_node);
|
||||
g_node_unlink (surface->applied_state.subsurface_branch_node);
|
||||
|
||||
if (!op->sibling)
|
||||
{
|
||||
surface->output_state.parent = NULL;
|
||||
surface->applied_state.parent = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
surface->output_state.parent = parent;
|
||||
surface->applied_state.parent = parent;
|
||||
|
||||
if (op->sibling == parent)
|
||||
sibling_node = parent->output_state.subsurface_leaf_node;
|
||||
sibling_node = parent->applied_state.subsurface_leaf_node;
|
||||
else
|
||||
sibling_node = op->sibling->output_state.subsurface_branch_node;
|
||||
sibling_node = op->sibling->applied_state.subsurface_branch_node;
|
||||
|
||||
switch (op->placement)
|
||||
{
|
||||
case META_WAYLAND_SUBSURFACE_PLACEMENT_ABOVE:
|
||||
g_node_insert_after (parent->output_state.subsurface_branch_node,
|
||||
g_node_insert_after (parent->applied_state.subsurface_branch_node,
|
||||
sibling_node,
|
||||
surface->output_state.subsurface_branch_node);
|
||||
surface->applied_state.subsurface_branch_node);
|
||||
break;
|
||||
case META_WAYLAND_SUBSURFACE_PLACEMENT_BELOW:
|
||||
g_node_insert_before (parent->output_state.subsurface_branch_node,
|
||||
g_node_insert_before (parent->applied_state.subsurface_branch_node,
|
||||
sibling_node,
|
||||
surface->output_state.subsurface_branch_node);
|
||||
surface->applied_state.subsurface_branch_node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -727,8 +727,8 @@ meta_wayland_surface_apply_state (MetaWaylandSurface *surface,
|
||||
meta_wayland_buffer_dec_use_count (surface->buffer);
|
||||
|
||||
g_set_object (&surface->buffer, state->buffer);
|
||||
g_clear_object (&surface->output_state.texture);
|
||||
surface->output_state.texture = g_steal_pointer (&state->texture);
|
||||
g_clear_object (&surface->applied_state.texture);
|
||||
surface->applied_state.texture = g_steal_pointer (&state->texture);
|
||||
|
||||
/* If the newly attached buffer is going to be accessed directly without
|
||||
* making a copy, such as an EGL buffer, mark it as in-use don't release
|
||||
@ -929,7 +929,7 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface)
|
||||
meta_wayland_buffer_realize (buffer);
|
||||
|
||||
if (!meta_wayland_buffer_attach (buffer,
|
||||
&surface->protocol_state.texture,
|
||||
&surface->committed_state.texture,
|
||||
&error))
|
||||
{
|
||||
g_warning ("Could not import pending buffer: %s", error->message);
|
||||
@ -941,14 +941,14 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface)
|
||||
return;
|
||||
}
|
||||
|
||||
pending->texture = g_object_ref (surface->protocol_state.texture);
|
||||
pending->texture = g_object_ref (surface->committed_state.texture);
|
||||
|
||||
g_object_ref (buffer);
|
||||
meta_wayland_buffer_inc_use_count (buffer);
|
||||
}
|
||||
else if (pending->newly_attached)
|
||||
{
|
||||
g_clear_object (&surface->protocol_state.texture);
|
||||
g_clear_object (&surface->committed_state.texture);
|
||||
}
|
||||
|
||||
if (meta_wayland_surface_is_synchronized (surface))
|
||||
@ -961,7 +961,7 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface)
|
||||
|
||||
meta_wayland_transaction_merge_pending_state (transaction, surface);
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->protocol_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->committed_state,
|
||||
subsurface_surface)
|
||||
{
|
||||
if (!subsurface_surface->sub.transaction)
|
||||
@ -1456,7 +1456,7 @@ meta_wayland_surface_finalize (GObject *object)
|
||||
|
||||
if (surface->buffer_held)
|
||||
meta_wayland_buffer_dec_use_count (surface->buffer);
|
||||
g_clear_object (&surface->output_state.texture);
|
||||
g_clear_object (&surface->applied_state.texture);
|
||||
g_clear_object (&surface->buffer);
|
||||
|
||||
g_clear_pointer (&surface->opaque_region, mtk_region_unref);
|
||||
@ -1478,7 +1478,7 @@ meta_wayland_surface_finalize (GObject *object)
|
||||
|
||||
meta_wayland_surface_discard_presentation_feedback (surface);
|
||||
|
||||
g_clear_pointer (&surface->output_state.subsurface_branch_node, g_node_destroy);
|
||||
g_clear_pointer (&surface->applied_state.subsurface_branch_node, g_node_destroy);
|
||||
|
||||
g_hash_table_destroy (surface->shortcut_inhibited_seats);
|
||||
|
||||
@ -1499,14 +1499,14 @@ wl_surface_destructor (struct wl_resource *resource)
|
||||
if (surface->resource)
|
||||
wl_resource_set_user_data (g_steal_pointer (&surface->resource), NULL);
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->protocol_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->committed_state,
|
||||
subsurface_surface)
|
||||
meta_wayland_subsurface_parent_destroyed (subsurface_surface);
|
||||
|
||||
g_clear_pointer (&surface->wl_subsurface, wl_resource_destroy);
|
||||
g_clear_pointer (&surface->protocol_state.subsurface_branch_node, g_node_destroy);
|
||||
g_clear_pointer (&surface->committed_state.subsurface_branch_node, g_node_destroy);
|
||||
|
||||
g_clear_object (&surface->protocol_state.texture);
|
||||
g_clear_object (&surface->committed_state.texture);
|
||||
|
||||
/*
|
||||
* Any transactions referencing this surface will keep it alive until they get
|
||||
@ -1743,13 +1743,13 @@ meta_wayland_surface_init (MetaWaylandSurface *surface)
|
||||
{
|
||||
surface->pending_state = meta_wayland_surface_state_new ();
|
||||
|
||||
surface->output_state.subsurface_branch_node = g_node_new (surface);
|
||||
surface->output_state.subsurface_leaf_node =
|
||||
g_node_prepend_data (surface->output_state.subsurface_branch_node, surface);
|
||||
surface->applied_state.subsurface_branch_node = g_node_new (surface);
|
||||
surface->applied_state.subsurface_leaf_node =
|
||||
g_node_prepend_data (surface->applied_state.subsurface_branch_node, surface);
|
||||
|
||||
surface->protocol_state.subsurface_branch_node = g_node_new (surface);
|
||||
surface->protocol_state.subsurface_leaf_node =
|
||||
g_node_prepend_data (surface->protocol_state.subsurface_branch_node, surface);
|
||||
surface->committed_state.subsurface_branch_node = g_node_new (surface);
|
||||
surface->committed_state.subsurface_leaf_node =
|
||||
g_node_prepend_data (surface->committed_state.subsurface_branch_node, surface);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2122,7 +2122,7 @@ meta_wayland_surface_is_shortcuts_inhibited (MetaWaylandSurface *surface,
|
||||
MetaMultiTexture *
|
||||
meta_wayland_surface_get_texture (MetaWaylandSurface *surface)
|
||||
{
|
||||
return surface->output_state.texture;
|
||||
return surface->applied_state.texture;
|
||||
}
|
||||
|
||||
MetaSurfaceActor *
|
||||
@ -2194,7 +2194,7 @@ meta_wayland_surface_get_buffer_width (MetaWaylandSurface *surface)
|
||||
MetaWaylandBuffer *buffer = meta_wayland_surface_get_buffer (surface);
|
||||
|
||||
if (buffer)
|
||||
return meta_multi_texture_get_width (surface->output_state.texture);
|
||||
return meta_multi_texture_get_width (surface->applied_state.texture);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
@ -2205,7 +2205,7 @@ meta_wayland_surface_get_buffer_height (MetaWaylandSurface *surface)
|
||||
MetaWaylandBuffer *buffer = meta_wayland_surface_get_buffer (surface);
|
||||
|
||||
if (buffer)
|
||||
return meta_multi_texture_get_height (surface->output_state.texture);
|
||||
return meta_multi_texture_get_height (surface->applied_state.texture);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
@ -2413,7 +2413,7 @@ meta_wayland_surface_is_xwayland (MetaWaylandSurface *surface)
|
||||
}
|
||||
|
||||
static void
|
||||
protocol_state_handle_highest_scale_monitor (MetaWaylandSurface *surface)
|
||||
committed_state_handle_highest_scale_monitor (MetaWaylandSurface *surface)
|
||||
{
|
||||
MetaWaylandSurface *subsurface_surface;
|
||||
double scale;
|
||||
@ -2422,13 +2422,13 @@ protocol_state_handle_highest_scale_monitor (MetaWaylandSurface *surface)
|
||||
|
||||
meta_wayland_fractional_scale_maybe_send_preferred_scale (surface, scale);
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->protocol_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->committed_state,
|
||||
subsurface_surface)
|
||||
protocol_state_handle_highest_scale_monitor (subsurface_surface);
|
||||
committed_state_handle_highest_scale_monitor (subsurface_surface);
|
||||
}
|
||||
|
||||
static void
|
||||
output_state_handle_highest_scale_monitor (MetaWaylandSurface *surface)
|
||||
applied_state_handle_highest_scale_monitor (MetaWaylandSurface *surface)
|
||||
{
|
||||
MetaWaylandSurface *subsurface_surface;
|
||||
MetaSurfaceActor *actor = meta_wayland_surface_get_actor (surface);
|
||||
@ -2436,16 +2436,16 @@ output_state_handle_highest_scale_monitor (MetaWaylandSurface *surface)
|
||||
if (actor)
|
||||
clutter_actor_notify_transform_invalid (CLUTTER_ACTOR (actor));
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface_surface)
|
||||
output_state_handle_highest_scale_monitor (subsurface_surface);
|
||||
applied_state_handle_highest_scale_monitor (subsurface_surface);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_notify_highest_scale_monitor (MetaWaylandSurface *surface)
|
||||
{
|
||||
output_state_handle_highest_scale_monitor (surface);
|
||||
protocol_state_handle_highest_scale_monitor (surface);
|
||||
applied_state_handle_highest_scale_monitor (surface);
|
||||
committed_state_handle_highest_scale_monitor (surface);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -912,7 +912,7 @@ tablet_tool_can_grab_surface (MetaWaylandTabletTool *tool,
|
||||
if (tool->focus_surface == surface)
|
||||
return TRUE;
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface)
|
||||
{
|
||||
if (tablet_tool_can_grab_surface (tool, subsurface))
|
||||
|
@ -578,7 +578,7 @@ touch_can_grab_surface (MetaWaylandTouchInfo *touch_info,
|
||||
if (touch_info->touch_surface->surface == surface)
|
||||
return TRUE;
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state,
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state,
|
||||
subsurface)
|
||||
{
|
||||
if (touch_can_grab_surface (touch_info, subsurface))
|
||||
|
@ -73,14 +73,14 @@ meta_wayland_transaction_sync_child_states (MetaWaylandSurface *surface)
|
||||
MetaWaylandSubsurface *subsurface;
|
||||
MetaWaylandActorSurface *actor_surface;
|
||||
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->output_state, subsurface_surface)
|
||||
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (&surface->applied_state, subsurface_surface)
|
||||
{
|
||||
subsurface = META_WAYLAND_SUBSURFACE (subsurface_surface->role);
|
||||
actor_surface = META_WAYLAND_ACTOR_SURFACE (subsurface);
|
||||
meta_wayland_actor_surface_sync_actor_state (actor_surface);
|
||||
}
|
||||
|
||||
if (!surface->output_state.parent &&
|
||||
if (!surface->applied_state.parent &&
|
||||
surface->role && META_IS_WAYLAND_SUBSURFACE (surface->role))
|
||||
{
|
||||
/* Unmapped sub-surface */
|
||||
@ -105,7 +105,7 @@ void
|
||||
meta_wayland_transaction_drop_subsurface_state (MetaWaylandTransaction *transaction,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
MetaWaylandSurface *parent = surface->protocol_state.parent;
|
||||
MetaWaylandSurface *parent = surface->committed_state.parent;
|
||||
MetaWaylandTransactionEntry *entry;
|
||||
|
||||
entry = meta_wayland_transaction_get_entry (transaction, surface);
|
||||
@ -126,9 +126,9 @@ is_ancestor (MetaWaylandSurface *candidate,
|
||||
{
|
||||
MetaWaylandSurface *ancestor;
|
||||
|
||||
for (ancestor = reference->output_state.parent;
|
||||
for (ancestor = reference->applied_state.parent;
|
||||
ancestor;
|
||||
ancestor = ancestor->output_state.parent)
|
||||
ancestor = ancestor->applied_state.parent)
|
||||
{
|
||||
if (ancestor == candidate)
|
||||
return TRUE;
|
||||
@ -145,7 +145,7 @@ meta_wayland_transaction_compare (const void *key1,
|
||||
MetaWaylandSurface *surface2 = *(MetaWaylandSurface **) key2;
|
||||
|
||||
/* Order of siblings doesn't matter */
|
||||
if (surface1->output_state.parent == surface2->output_state.parent)
|
||||
if (surface1->applied_state.parent == surface2->applied_state.parent)
|
||||
return 0;
|
||||
|
||||
/* Ancestor surfaces come before descendant surfaces */
|
||||
|
Loading…
Reference in New Issue
Block a user