summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2022-11-14 00:14:05 +0100
committerRobert Mader <robert.mader@posteo.de>2022-12-03 09:37:38 +0000
commit2a76ed99ab48c1cc822e29404df4910b2e3418ec (patch)
tree7d2e70b45233dfe744e4cdd9e6f8a1bf50abc2f0
parent6e4c193901c1bc1c678b0b175d74e8d14f0c66a3 (diff)
downloadmutter-2a76ed99ab48c1cc822e29404df4910b2e3418ec.tar.gz
clutter/actor: Show on all stage-views when actors have no allocation
When a badly behaving ClutterActor implementation manages to invalidate the allocation after the layout phase and before painting, we have no idea where the actor should be painted without running the whole layout machinery again. For paint volumes in this case we pretend the actor covers the whole stage and queue full-stage redraws. When updating stage-views, we're also handling this case, but not in the most graceful way. Just like with paint volumes, we should assume an actor without a valid allocation is simply everywhere, so set priv->stage_views to all available stage views in that case. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6054 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2694> (cherry picked from commit 61cc31c3ce37d6a1d977f6cdccc3703ca824a51e)
-rw-r--r--clutter/clutter/clutter-actor.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index c815eb4e5..ac0cfae93 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -16011,18 +16011,19 @@ update_stage_views (ClutterActor *self)
ClutterStage *stage;
graphene_rect_t bounding_rect;
+ stage = CLUTTER_STAGE (_clutter_actor_get_stage_internal (self));
+ g_return_if_fail (stage);
+
old_stage_views = g_steal_pointer (&priv->stage_views);
if (priv->needs_allocation)
{
g_warning ("Can't update stage views actor %s is on because it needs an "
"allocation.", _clutter_actor_get_debug_name (self));
+ priv->stage_views = g_list_copy (clutter_stage_peek_stage_views (stage));
goto out;
}
- stage = CLUTTER_STAGE (_clutter_actor_get_stage_internal (self));
- g_return_if_fail (stage);
-
clutter_actor_get_transformed_extents (self, &bounding_rect);
if (bounding_rect.size.width == 0.0 ||