wayland/pointer-confinement: Scale region with the geometry scale

Without applying the geometry scale, to both the region and the minimum
edge distance, the confinement area becomes too small and offset on
HiDPI setups.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2110
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2460>
This commit is contained in:
Jonas Ådahl
2022-06-13 10:25:02 +02:00
committed by Marge Bot
parent 6d46ffccbc
commit ccde353fb3
3 changed files with 26 additions and 1 deletions

View File

@@ -2257,3 +2257,14 @@ meta_wayland_surface_can_scanout_untransformed (MetaWaylandSurface *surface,
return TRUE;
}
int
meta_wayland_surface_get_geometry_scale (MetaWaylandSurface *surface)
{
MetaWaylandActorSurface *actor_surface;
g_return_val_if_fail (META_IS_WAYLAND_ACTOR_SURFACE (surface->role), 1);
actor_surface = META_WAYLAND_ACTOR_SURFACE (surface->role);
return meta_wayland_actor_surface_get_geometry_scale (actor_surface);
}