[mutter/wip/carlosg/undo-grabs-harder: 2/2] clutter: Only allow grabs to be created on realized actors
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/undo-grabs-harder: 2/2] clutter: Only allow grabs to be created on realized actors
- Date: Tue, 18 Oct 2022 10:17:40 +0000 (UTC)
commit 95287df12fd984b4497a9cc6dd54b12aebd15c4e
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 18 12:11:03 2022 +0200
clutter: Only allow grabs to be created on realized actors
The bare minimum that we can ask to an actor before creating a grab
on it is that it is realized (and thus, attached to the stage). Bail
out if that is not the case when creating a grab.
clutter/clutter/clutter-stage.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 56919c827a..2b3c03ae2c 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -3790,6 +3790,7 @@ 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);
priv = stage->priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]