[mutter/wip/carlosg/less-eager-precondition] clutter: Demote the new clutter_stage_grab() precondition check
- From: Marge Bot <marge-bot 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 16:14:54 +0000 (UTC)
commit 714f01048eac3cb8c8f578132afd49bd164f2ada
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)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2670>
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]