From 16a5911cff90a2bba1b283ccd9a9ce6d0f435924 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 3 Feb 2010 15:05:37 +0000 Subject: [PATCH] tests: Clean up the cairo-flowers interactive test --- tests/interactive/test-clutter-cairo-flowers.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/interactive/test-clutter-cairo-flowers.c b/tests/interactive/test-clutter-cairo-flowers.c index fc3b5080e..1e3047118 100644 --- a/tests/interactive/test-clutter-cairo-flowers.c +++ b/tests/interactive/test-clutter-cairo-flowers.c @@ -145,14 +145,16 @@ tick (ClutterTimeline *timeline, Flower **flowers = (Flower**)data; gint i = 0; - for (i=0; i< N_FLOWERS; i++) + for (i = 0; i < N_FLOWERS; i++) { + ClutterActor *stage; + flowers[i]->y += flowers[i]->v; flowers[i]->rot += flowers[i]->rv; - if (flowers[i]->y > (gint)clutter_actor_get_height - (clutter_stage_get_default ())) - flowers[i]->y = -clutter_actor_get_height (flowers[i]->ctex); + stage = clutter_stage_get_default (); + if (flowers[i]->y > (gint) clutter_actor_get_height (stage)) + flowers[i]->y = -clutter_actor_get_height (flowers[i]->ctex); clutter_actor_set_position (flowers[i]->ctex, flowers[i]->x, flowers[i]->y); @@ -164,12 +166,8 @@ tick (ClutterTimeline *timeline, clutter_actor_get_height (flowers[i]->ctex)/2, 0); } - - return TRUE; } -void foo(void) { g_usleep(10000000); } - int test_clutter_cairo_flowers_main (int argc, char **argv) {