[gnome-control-center/wip/animated-notebook] shell: Don't use clutter_actor_get_position()



commit 4d50e965fae6b09a785a8bd920bb6e09715bc6be
Author: Bastien Nocera <hadess hadess net>
Date:   Wed May 2 17:57:52 2012 +0100

    shell: Don't use clutter_actor_get_position()

 shell/cc-notebook.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/shell/cc-notebook.c b/shell/cc-notebook.c
index 4f7599b..cb65bd5 100644
--- a/shell/cc-notebook.c
+++ b/shell/cc-notebook.c
@@ -219,7 +219,11 @@ cc_notebook_select_page_at_index (CcNotebook *self,
         item = clutter_actor_get_child_at_index (self->priv->bin, index_);
         g_assert (item != NULL);
 
-        clutter_actor_get_position (item, &pos.x, &pos.y);
+	/* Don't use clutter_actor_get_position() here
+	 * because the layout manager might not have had the
+	 * chance to move the actor yet */
+	pos.y = 0;
+	pos.x = self->priv->last_width * index_;
         g_message ("scrolling to %lfx%lf (item %d)", pos.x, pos.y, index_);
         clutter_scroll_actor_scroll_to_point (CLUTTER_SCROLL_ACTOR (self->priv->scroll), &pos);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]