mirror of
https://github.com/brl/mutter.git
synced 2025-05-13 18:44:56 +00:00
Check timeline direction when forcing final state
If the timeline is running backwards, the completed signal handler should set the final state from the interval's initial value. Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
373b165b3f
commit
3761e9cd47
@ -132,9 +132,14 @@ clutter_animation_real_completed (ClutterAnimation *self)
|
|||||||
{
|
{
|
||||||
ClutterAnimationPrivate *priv = self->priv;
|
ClutterAnimationPrivate *priv = self->priv;
|
||||||
ClutterAnimation *animation;
|
ClutterAnimation *animation;
|
||||||
|
ClutterTimeline *timeline;
|
||||||
|
ClutterTimelineDirection direction;
|
||||||
gpointer key, value;
|
gpointer key, value;
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
|
|
||||||
|
timeline = clutter_animation_get_timeline (self);
|
||||||
|
direction = clutter_timeline_get_direction (timeline);
|
||||||
|
|
||||||
/* explicitly set the final state of the animation */
|
/* explicitly set the final state of the animation */
|
||||||
g_hash_table_iter_init (&iter, priv->properties);
|
g_hash_table_iter_init (&iter, priv->properties);
|
||||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||||
@ -143,7 +148,11 @@ clutter_animation_real_completed (ClutterAnimation *self)
|
|||||||
ClutterInterval *interval = value;
|
ClutterInterval *interval = value;
|
||||||
GValue *p_value;
|
GValue *p_value;
|
||||||
|
|
||||||
|
if (direction == CLUTTER_TIMELINE_FORWARD)
|
||||||
p_value = clutter_interval_peek_final_value (interval);
|
p_value = clutter_interval_peek_final_value (interval);
|
||||||
|
else
|
||||||
|
p_value = clutter_interval_peek_initial_value (interval);
|
||||||
|
|
||||||
g_object_set_property (priv->object, p_name, p_value);
|
g_object_set_property (priv->object, p_name, p_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user