mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter/actor: Round to 256ths when projecting for picking
Picking is specially sensitive for float precision, and tests can
easily fail when something changes, even if ever so slightly. A
simple way to workaround this is by adjusting the projected points
using the same procedure described at 67cc60cbda
.
Round projected points for picking to 256ths.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
This commit is contained in:
parent
8809ee9e26
commit
d08f724bc3
@ -1294,6 +1294,9 @@ _clutter_actor_transform_local_box_to_stage (ClutterActor *self,
|
||||
&vertices[v].y,
|
||||
&z,
|
||||
&w);
|
||||
|
||||
clutter_round_to_256ths (&vertices[v].x);
|
||||
clutter_round_to_256ths (&vertices[v].y);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user