From 3e9e5a11da12e9b8e8cfbace8146e3b86231c5c9 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Wed, 14 Jan 2009 15:18:05 +0000 Subject: [PATCH] [test-depth] cast width to gint when calculating -width/2 It was a fluke that this worked out due to how clutter_actor_set_depth internally converts the incorrect integer result to fixed point. --- tests/interactive/test-depth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/interactive/test-depth.c b/tests/interactive/test-depth.c index 02e5e8bce..394398147 100644 --- a/tests/interactive/test-depth.c +++ b/tests/interactive/test-depth.c @@ -40,7 +40,7 @@ clone_box (ClutterTexture *original) clone = clutter_clone_texture_new (original); clutter_container_add_actor (CLUTTER_CONTAINER (group), clone); clutter_actor_set_rotation (clone, CLUTTER_Y_AXIS, 180, width/2, 0, 0); - clutter_actor_set_depth (clone, -width/2); + clutter_actor_set_depth (clone, -(gint)width/2); clone = clutter_clone_texture_new (original); clutter_container_add_actor (CLUTTER_CONTAINER (group), clone); @@ -57,13 +57,13 @@ clone_box (ClutterTexture *original) clone = clutter_clone_texture_new (original); clutter_container_add_actor (CLUTTER_CONTAINER (group), clone); clutter_actor_set_rotation (clone, CLUTTER_X_AXIS, 90, 0, 0, 0); - clutter_actor_set_depth (clone, -width/2); + clutter_actor_set_depth (clone, -(gint)width/2); clutter_actor_set_position (clone, 0, height); clone = clutter_clone_texture_new (original); clutter_container_add_actor (CLUTTER_CONTAINER (group), clone); clutter_actor_set_rotation (clone, CLUTTER_X_AXIS, 90, 0, 0, 0); - clutter_actor_set_depth (clone, -width/2); + clutter_actor_set_depth (clone, -(gint)width/2); clutter_actor_set_position (clone, 0, 0); clutter_actor_show_all (group);