From d8825e0d1209d6aee6909f194d04a34b5ff0f9fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 5 Jun 2019 14:46:35 +0000 Subject: [PATCH] shell: Stop using anchor point Since the removal of the old (pre-3.16) message tray, legacy tray icons are very unlikely to be placed in a container that is animated using the deprecated anchor point. Just assume that the regular stage position is good enough. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/572 --- src/shell-gtk-embed.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) 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),