The test should keep track of the last animation and avoid reconnecting
signals to the same instance in case the -r argument has been passed.
static ClutterActor *main_stage = NULL;
static ClutterActor *easing_mode_label = NULL;
+static ClutterAnimation *last_animation = NULL;
+
static void
on_animation_completed (ClutterAnimation *animation,
ClutterActor *rectangle)
"y", event->y,
NULL);
- if (recenter)
+ if (recenter && last_animation != animation)
g_signal_connect_after (animation, "completed",
G_CALLBACK (on_animation_completed),
rectangle);
+
+ last_animation = animation;
}
return TRUE;