surface-actor/wayland: Implement stable size and position rounding

Implement the stable rounding algorithm as described in the discussions
for the fractional-scale-v1 protocol.

This adds an override of the ClutterActor::apply_transform vfunc for
MetaSurfaceActorWayland that ensures the size and position of the
contents of the surface are rounded according to the stable rounding
algorithm.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726>
This commit is contained in:
msizanoen1
2022-11-26 18:33:46 +07:00
committed by Marge Bot
parent ed90c78872
commit e94b527777
5 changed files with 139 additions and 0 deletions

View File

@ -90,6 +90,8 @@ sync_actor_subsurface_state (MetaWaylandSurface *surface)
clutter_actor_show (actor);
else
clutter_actor_hide (actor);
clutter_actor_notify_transform_invalid (actor);
}
static gboolean
@ -555,6 +557,8 @@ wl_subcompositor_get_subsurface (struct wl_client *client,
surface->sub.synchronous = TRUE;
surface->protocol_state.parent = parent;
meta_wayland_surface_notify_highest_scale_monitor (surface);
reference =
g_node_last_child (parent->protocol_state.subsurface_branch_node)->data;
queue_subsurface_placement (surface, reference,