clutter: Centralize repick handling due to transform changes
Since we just queue up repicks, we can improve the mechanism
added at commit 4d76a21029
this so it's less ad-hoc.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3385>
This commit is contained in:
parent
9f00572762
commit
819d62cde2
@ -2397,11 +2397,7 @@ transform_changed (ClutterActor *actor)
|
||||
absolute_geometry_changed_cb,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
update_pointer_if_not_animated (ClutterActor *actor)
|
||||
{
|
||||
if (!clutter_actor_has_transitions (actor) &&
|
||||
!CLUTTER_ACTOR_IN_RELAYOUT (actor))
|
||||
clutter_actor_update_devices (actor);
|
||||
@ -4264,7 +4260,6 @@ clutter_actor_set_pivot_point_internal (ClutterActor *self,
|
||||
info->pivot = *pivot;
|
||||
|
||||
transform_changed (self);
|
||||
update_pointer_if_not_animated (self);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_PIVOT_POINT]);
|
||||
|
||||
@ -4281,7 +4276,6 @@ clutter_actor_set_pivot_point_z_internal (ClutterActor *self,
|
||||
info->pivot_z = pivot_z;
|
||||
|
||||
transform_changed (self);
|
||||
update_pointer_if_not_animated (self);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_PIVOT_POINT_Z]);
|
||||
|
||||
@ -4316,7 +4310,6 @@ clutter_actor_set_translation_internal (ClutterActor *self,
|
||||
g_assert_not_reached ();
|
||||
|
||||
transform_changed (self);
|
||||
update_pointer_if_not_animated (self);
|
||||
|
||||
clutter_actor_queue_redraw (self);
|
||||
g_object_notify_by_pspec (obj, pspec);
|
||||
@ -4446,7 +4439,6 @@ clutter_actor_set_rotation_angle_internal (ClutterActor *self,
|
||||
g_assert_not_reached ();
|
||||
|
||||
transform_changed (self);
|
||||
update_pointer_if_not_animated (self);
|
||||
|
||||
clutter_actor_queue_redraw (self);
|
||||
|
||||
@ -4568,7 +4560,6 @@ clutter_actor_set_scale_factor_internal (ClutterActor *self,
|
||||
g_assert_not_reached ();
|
||||
|
||||
transform_changed (self);
|
||||
update_pointer_if_not_animated (self);
|
||||
|
||||
clutter_actor_queue_redraw (self);
|
||||
g_object_notify_by_pspec (obj, pspec);
|
||||
@ -10402,7 +10393,6 @@ clutter_actor_set_z_position_internal (ClutterActor *self,
|
||||
info->z_position = z_position;
|
||||
|
||||
transform_changed (self);
|
||||
update_pointer_if_not_animated (self);
|
||||
|
||||
clutter_actor_queue_redraw (self);
|
||||
|
||||
@ -13351,7 +13341,6 @@ clutter_actor_set_transform_internal (ClutterActor *self,
|
||||
info->transform_set = !graphene_matrix_is_identity (&info->transform);
|
||||
|
||||
transform_changed (self);
|
||||
update_pointer_if_not_animated (self);
|
||||
|
||||
clutter_actor_queue_redraw (self);
|
||||
|
||||
@ -18492,7 +18481,6 @@ clutter_actor_invalidate_transform (ClutterActor *self)
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||
|
||||
transform_changed (self);
|
||||
update_pointer_if_not_animated (self);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -18624,8 +18612,5 @@ clutter_actor_notify_transform_invalid (ClutterActor *self)
|
||||
g_assert (priv->transform_valid);
|
||||
|
||||
if (!graphene_matrix_equal (&old_transform, &priv->transform))
|
||||
{
|
||||
update_pointer_if_not_animated (self);
|
||||
clutter_actor_queue_redraw (self);
|
||||
}
|
||||
clutter_actor_queue_redraw (self);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user