diff options
author | Robert Mader <robert.mader@posteo.de> | 2022-12-09 20:16:00 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-12-16 16:27:33 +0000 |
commit | cef925c37f30431f51799ed2e5f3e18a8f2f9c1b (patch) | |
tree | 7e8278a2f990f09846d5c33217be38700f934e19 | |
parent | 04655c8bffc2e9dd4842f344637022e66d7ebcf1 (diff) | |
download | mutter-cef925c37f30431f51799ed2e5f3e18a8f2f9c1b.tar.gz |
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2671>
-rw-r--r-- | clutter/clutter/clutter-actor.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; |