mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
clutter/pan-action: Use graphene APIs
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
This commit is contained in:
parent
6aa29640d6
commit
571bf5af6d
@ -355,11 +355,14 @@ clutter_pan_action_real_pan (ClutterPanAction *self,
|
|||||||
{
|
{
|
||||||
gfloat dx, dy;
|
gfloat dx, dy;
|
||||||
graphene_matrix_t transform;
|
graphene_matrix_t transform;
|
||||||
|
graphene_matrix_t translate;
|
||||||
|
|
||||||
clutter_pan_action_get_constrained_motion_delta (self, 0, &dx, &dy);
|
clutter_pan_action_get_constrained_motion_delta (self, 0, &dx, &dy);
|
||||||
|
|
||||||
clutter_actor_get_child_transform (actor, &transform);
|
clutter_actor_get_child_transform (actor, &transform);
|
||||||
cogl_matrix_translate (&transform, dx, dy, 0.0f);
|
graphene_matrix_init_translate (&translate,
|
||||||
|
&GRAPHENE_POINT3D_INIT (dx, dy, 0.0f));
|
||||||
|
graphene_matrix_multiply (&translate, &transform, &transform);
|
||||||
clutter_actor_set_child_transform (actor, &transform);
|
clutter_actor_set_child_transform (actor, &transform);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user