From 714f01048eac3cb8c8f578132afd49bd164f2ada Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 18 Oct 2022 17:52:50 +0200 Subject: [PATCH] clutter: Demote the new clutter_stage_grab() precondition check There do indeed seem to be places in our own code that trigger grabs on actors before they are realized. It was not the intention to change the practical preconditions for GNOME 43, so make it an even lower minimum that every caller ought to match: That the actor is attached to the stage. Further constraining of these preconditions will have to wait until branching for new development. Fixes: 9c79c7234 (clutter: Only allow grabs to be created on realized actors) Part-of: --- clutter/clutter/clutter-stage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index 2b3c03ae2..7d24cf4a8 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -3790,7 +3790,9 @@ clutter_stage_grab (ClutterStage *stage, g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL); g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), NULL); - g_return_val_if_fail (clutter_actor_is_realized (actor), NULL); + g_return_val_if_fail (stage == + (ClutterStage *) _clutter_actor_get_stage_internal (actor), + NULL); priv = stage->priv;