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:
@ -212,6 +212,7 @@ meta_pointer_confinement_wayland_create_constraint (MetaPointerConfinementWaylan
|
||||
MetaWaylandSurface *surface;
|
||||
cairo_region_t *region;
|
||||
float dx, dy;
|
||||
double min_edge_distance;
|
||||
|
||||
priv = meta_pointer_confinement_wayland_get_instance_private (confinement);
|
||||
|
||||
@ -222,7 +223,8 @@ meta_pointer_confinement_wayland_create_constraint (MetaPointerConfinementWaylan
|
||||
meta_wayland_surface_get_absolute_coordinates (surface, 0, 0, &dx, &dy);
|
||||
cairo_region_translate (region, dx, dy);
|
||||
|
||||
constraint = meta_pointer_constraint_new (region);
|
||||
min_edge_distance = wl_fixed_to_double (1);
|
||||
constraint = meta_pointer_constraint_new (region, min_edge_distance);
|
||||
cairo_region_destroy (region);
|
||||
|
||||
return constraint;
|
||||
|
Reference in New Issue
Block a user