diff --git a/src/shell-gtk-embed.c b/src/shell-gtk-embed.c index 057f877cb..6d3a66466 100644 --- a/src/shell-gtk-embed.c +++ b/src/shell-gtk-embed.c @@ -280,7 +280,7 @@ shell_gtk_embed_allocate (ClutterActor *actor, { ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor); ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed); - float wx = 0.0, wy = 0.0, x, y, ax, ay; + float wx, wy; CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)-> allocate (actor, box, flags); @@ -288,16 +288,7 @@ shell_gtk_embed_allocate (ClutterActor *actor, /* Find the actor's new coordinates in terms of the stage (which is * priv->window's parent window. */ - while (actor) - { - clutter_actor_get_position (actor, &x, &y); - clutter_actor_get_anchor_point (actor, &ax, &ay); - - wx += x - ax; - wy += y - ay; - - actor = clutter_actor_get_parent (actor); - } + clutter_actor_get_transformed_position (actor, &wx, &wy); _shell_embedded_window_allocate (priv->window, (int)(0.5 + wx), (int)(0.5 + wy),