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
This commit is contained in:
Florian Müllner 2019-06-05 14:46:35 +00:00 committed by Georges Basile Stavracas Neto
parent 3c5fea59df
commit d8825e0d12

View File

@ -280,7 +280,7 @@ shell_gtk_embed_allocate (ClutterActor *actor,
{ {
ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor); ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed); 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)-> CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->
allocate (actor, box, flags); 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 /* Find the actor's new coordinates in terms of the stage (which is
* priv->window's parent window. * priv->window's parent window.
*/ */
while (actor) clutter_actor_get_transformed_position (actor, &wx, &wy);
{
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);
}
_shell_embedded_window_allocate (priv->window, _shell_embedded_window_allocate (priv->window,
(int)(0.5 + wx), (int)(0.5 + wy), (int)(0.5 + wx), (int)(0.5 + wy),