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>
This commit is contained in:

committed by
Marge Bot

parent
c0537096c2
commit
d686865918
@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user