pointer-constraints: Move min edge distance from backend to Wayland

The min distance to the right/bottom edge depends on Wayland concepts
(wl_fixed_t) and eventually geometry scale. Move the logic the Wayland
side of the pointer constraints machinery to avoid the backend trying to
figure this out without the proper data.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2460>
This commit is contained in:
Jonas Ådahl
2022-06-13 10:23:40 +02:00
committed by Marge Bot
parent 94aaa65bd2
commit 6d46ffccbc
7 changed files with 42 additions and 18 deletions

View File

@ -35,9 +35,13 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (MetaPointerConstraint, meta_pointer_constraint,
META, POINTER_CONSTRAINT, GObject);
MetaPointerConstraint * meta_pointer_constraint_new (const cairo_region_t *region);
MetaPointerConstraint * meta_pointer_constraint_new (const cairo_region_t *region,
double min_edge_distance);
cairo_region_t * meta_pointer_constraint_get_region (MetaPointerConstraint *constraint);
double meta_pointer_constraint_get_min_edge_distance (MetaPointerConstraint *constraint);
#define META_TYPE_POINTER_CONSTRAINT_IMPL (meta_pointer_constraint_impl_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaPointerConstraintImpl, meta_pointer_constraint_impl,
META, POINTER_CONSTRAINT_IMPL, GObject);