From cef925c37f30431f51799ed2e5f3e18a8f2f9c1b Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Fri, 9 Dec 2022 20:16:00 +0100 Subject: [PATCH] clutter/actor: Make is_effectively_on_stage_view() match has_mapped_clones() The clone handling did not take certain cases into consideration, thus copy over some extra checks from `has_mapped_clones()`, ensuring consistent behavior. Part-of: --- clutter/clutter/clutter-actor.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index 6ed14e29e..8af90122d 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -15618,11 +15618,21 @@ clutter_actor_is_effectively_on_stage_view (ClutterActor *self, ClutterActor *clone = key; GList *clone_views; + if (!CLUTTER_ACTOR_IS_MAPPED (clone)) + continue; + clone_views = clutter_actor_peek_stage_views (clone); if (g_list_find (clone_views, view)) return TRUE; } } + + /* Clones will force-show their own source actor but not children of + * it, so if we're hidden and an actor up the hierarchy has a clone, + * we won't be visible. + */ + if (!CLUTTER_ACTOR_IS_VISIBLE (actor)) + return FALSE; } return FALSE;