summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Degrande <Samuel.Degrande@lifl.fr>2012-05-18 15:32:10 +0200
committerEmmanuele Bassi <ebassi@linux.intel.com>2012-05-18 15:17:24 +0100
commit98016e190a5dc441613d9c10e07a1ea6a9371324 (patch)
treef78ee52dc0a357261713637054f1f82f72a8cae2
parent3cf4c9980ffcc9ef1bf63d8eed255d1634c4a2f6 (diff)
downloadclutter-98016e190a5dc441613d9c10e07a1ea6a9371324.tar.gz
Wrong position of the last child of a BoxLayout.
When the first child of a box layout container is invisible, the position of the last displayed child is wrong. ClutterBoxLayout::allocate() first computes the sizes needed for each of the visible children and stores those sizes into a 'sizes' array (the array counter is incremented on visible children only). Later on, ClutterBoxLayout::allocate() computes the position of each visible children, using the 'sizes' array. However, it uses the child index to access the array, instead of a 'visible child index'. https://bugzilla.gnome.org/show_bug.cgi?id=669291
-rw-r--r--clutter/clutter-box-layout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/clutter/clutter-box-layout.c b/clutter/clutter-box-layout.c
index 9e063864f..937bad3a3 100644
--- a/clutter/clutter-box-layout.c
+++ b/clutter/clutter-box-layout.c
@@ -1033,7 +1033,7 @@ clutter_box_layout_allocate (ClutterLayoutManager *layout,
x = box->x1;
}
- for (l = children, i = 0; l != NULL; l = l->next, i += 1)
+ for (l = children, i = 0; l != NULL; l = l->next)
{
ClutterLayoutMeta *meta;
ClutterBoxChild *box_child;
@@ -1141,6 +1141,8 @@ clutter_box_layout_allocate (ClutterLayoutManager *layout,
child,
&child_allocation,
flags);
+
+ i++;
}
g_list_free (children);