[mutter] clutter/fixed-layout: Ignore hidden children in size request
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/fixed-layout: Ignore hidden children in size request
- Date: Wed, 6 Jul 2022 19:22:57 +0000 (UTC)
commit d2c46162427ebaa8ba244643e29d9f3a1082538b
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jun 29 15:17:05 2022 +0200
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>
clutter/clutter/clutter-fixed-layout.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/clutter/clutter/clutter-fixed-layout.c b/clutter/clutter/clutter-fixed-layout.c
index 095f2d7524..9f68bb1757 100644
--- a/clutter/clutter/clutter-fixed-layout.c
+++ b/clutter/clutter/clutter-fixed-layout.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]