Fixed box calculation in clutter_group_query_coords()

This commit is contained in:
Tomas Frydrych 2007-06-29 10:46:12 +00:00
parent 1677e9d263
commit 9958a1e6d2
2 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2007-06-29 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-group.c:
(clutter_group_query_coords):
Fixed box calculation.
2007-06-28 Tomas Frydrych <tf@openedhand.com> 2007-06-28 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-group.c: * clutter/clutter-group.c:

View File

@ -163,12 +163,14 @@ clutter_group_query_coords (ClutterActor *self,
* positions. * positions.
* *
* Also x1 and x2 will be set by parent caller. * Also x1 and x2 will be set by parent caller.
*
* FIXME: this assumes that children are not rotated in anyway.
*/ */
if (box->x2 == 0 || cbox.x2 > box->x2) if (box->x2 - box->x1 < cbox.x2)
box->x2 = cbox.x2; box->x2 = cbox.x2 + box->x1;
if (box->y2 == 0 || cbox.y2 > box->y2) if (box->y2 - box->y1 < cbox.y2)
box->y2 = cbox.y2; box->y2 = cbox.y2 + box->y1;
} }
} }
while ((child_item = g_list_next(child_item)) != NULL); while ((child_item = g_list_next(child_item)) != NULL);