[mutter/wip/carlosg/less-eager-precondition] clutter: Demote the new clutter_stage_grab() precondition check
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/less-eager-precondition] clutter: Demote the new clutter_stage_grab() precondition check
- Date: Tue, 18 Oct 2022 15:58:34 +0000 (UTC)
commit ff8a46b853dd37cdcb499a7d8108c33924e935b1
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 18 17:52:50 2022 +0200
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)
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 2b3c03ae2c..7d24cf4a8f 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]