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:
parent
3c5fea59df
commit
d8825e0d12
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user