clutter/fixed-layout: Ignore hidden children in size request

Hidden actors aren't only invisible, they should also not take
up any size.

Found in the context of
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2347

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2488>
This commit is contained in:
Florian Müllner 2022-06-29 15:17:05 +02:00 committed by Marge Bot
parent 995ee2b638
commit d2c4616242

View File

@ -66,6 +66,9 @@ clutter_fixed_layout_get_preferred_width (ClutterLayoutManager *manager,
{
gfloat child_x, child_min, child_natural;
if (!clutter_actor_is_visible (child))
continue;
child_x = clutter_actor_get_x (child);
clutter_actor_get_preferred_size (child,
@ -108,6 +111,9 @@ clutter_fixed_layout_get_preferred_height (ClutterLayoutManager *manager,
{
gfloat child_y, child_min, child_natural;
if (!clutter_actor_is_visible (child))
continue;
child_y = clutter_actor_get_y (child);
clutter_actor_get_preferred_size (child,