1
0
Fork 0

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.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2669>
This commit is contained in:
Carlos Garnacho 2022-10-18 12:11:03 +02:00
parent e3df7b3384
commit 9c79c72341

View file

@ -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;