diff options
author | Robert Mader <robert.mader@posteo.de> | 2022-12-09 20:16:00 +0100 |
---|---|---|
committer | Robert Mader <robert.mader@collabora.com> | 2023-01-06 13:53:08 +0100 |
commit | 9328bf523f246fd455f2f8864d5dbae99f5ad641 (patch) | |
tree | ff26e1b96acfb87f58a403d5076f88d3ace40bb5 | |
parent | 74231c839c06a32f6a0ae61515a30b49c71a6661 (diff) | |
download | mutter-9328bf523f246fd455f2f8864d5dbae99f5ad641.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>
(cherry picked from commit cef925c37f30431f51799ed2e5f3e18a8f2f9c1b)
-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 ac0cfae93..d34c8f59f 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -16155,11 +16155,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; |