From 9958a1e6d2cbbde181d9c8098b0474cdb4940c60 Mon Sep 17 00:00:00 2001 From: Tomas Frydrych Date: Fri, 29 Jun 2007 10:46:12 +0000 Subject: [PATCH] Fixed box calculation in clutter_group_query_coords() --- ChangeLog | 6 ++++++ clutter/clutter-group.c | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96c24a00e..1b1aff15b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-29 Tomas Frydrych + + * clutter/clutter-group.c: + (clutter_group_query_coords): + Fixed box calculation. + 2007-06-28 Tomas Frydrych * clutter/clutter-group.c: diff --git a/clutter/clutter-group.c b/clutter/clutter-group.c index 63b0de822..1597be301 100644 --- a/clutter/clutter-group.c +++ b/clutter/clutter-group.c @@ -156,19 +156,21 @@ clutter_group_query_coords (ClutterActor *self, /* if (CLUTTER_ACTOR_IS_VISIBLE (child)) */ { ClutterActorBox cbox; - + clutter_actor_query_coords (child, &cbox); /* Ignore any children with offscreen ( negaive ) * positions. * * Also x1 and x2 will be set by parent caller. - */ - if (box->x2 == 0 || cbox.x2 > box->x2) - box->x2 = cbox.x2; + * + * FIXME: this assumes that children are not rotated in anyway. + */ + if (box->x2 - box->x1 < cbox.x2) + box->x2 = cbox.x2 + box->x1; - if (box->y2 == 0 || cbox.y2 > box->y2) - box->y2 = cbox.y2; + if (box->y2 - box->y1 < cbox.y2) + box->y2 = cbox.y2 + box->y1; } } while ((child_item = g_list_next(child_item)) != NULL);