tests/conform/actor-pivot-point: Show stage before allocating

We're going to enforce some invariants a bit stricter and will only
allow allocating if an actor is mapped, not only visible.

Since actors are only mapped if their parent is mapped and stages are
hidden by default, we need to show the stage to ensure the actors are
mapped before we allocate them. So do that and call clutter_actor_show()
on the stage before fake-allocating the test actors.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1366
This commit is contained in:
Jonas Dreßler 2020-07-10 13:05:21 +02:00 committed by Carlos Garnacho
parent cbf3001bc2
commit 650efb6445

View File

@ -22,6 +22,8 @@ actor_pivot (void)
clutter_actor_add_child (stage, actor_implicit);
clutter_actor_add_child (stage, actor_explicit);
clutter_actor_show (stage);
/* Fake allocation or pivot-point will not have any effect */
clutter_actor_allocate (actor_implicit, &allocation);
clutter_actor_allocate (actor_explicit, &allocation);