pointer-constraints/native: Warp locked pointer to correct position
In case of empty regions (e.g. when locking the pointer) the pointer was only forced to stay within the boundaries of its current pixel (i.e. culling subpixel position), instead of the position where the pointer lock did start. Fixes:07d24fe50
("backends/native: Allow infinitely small pointer constraint regions") Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3749> (cherry picked from commitd686865918
)
This commit is contained in:
parent
6a2e8e43a7
commit
e14bd837e1
1 changed files with 5 additions and 1 deletions
|
@ -619,7 +619,11 @@ meta_pointer_constraint_impl_native_ensure_constrained (MetaPointerConstraintImp
|
|||
{
|
||||
if (x != constraint_impl_native->origin.x ||
|
||||
y != constraint_impl_native->origin.y)
|
||||
clutter_seat_warp_pointer (seat, x, y);
|
||||
{
|
||||
clutter_seat_warp_pointer (seat,
|
||||
constraint_impl_native->origin.x,
|
||||
constraint_impl_native->origin.y);
|
||||
}
|
||||
}
|
||||
else if (!mtk_region_contains_point (region, (int) rel_x, (int) rel_y))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue