Skip to content

Commit 7272543

Browse files
committed
clutter/actor: Add semi-private API to check for transitions
Transitions are used for animating actors when e.g. going from/to fullscreen, and the like. We need to know such things when deciding whether to avoid compositing a window actor, so make add API visible to mutter that checks whether there are any transitions active. Original Mutter commit: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/798/diffs?commit_id=bc178b711ffbd8db0b7cfecefb6f67edf4e0254f
1 parent 6f11bf3 commit 7272543

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

clutter/clutter/clutter-actor.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20020,6 +20020,23 @@ clutter_actor_get_transition (ClutterActor *self,
2002020020
return clos->transition;
2002120021
}
2002220022

20023+
/**
20024+
* clutter_actor_has_transitions: (skip)
20025+
*/
20026+
gboolean
20027+
clutter_actor_has_transitions (ClutterActor *self)
20028+
{
20029+
const ClutterAnimationInfo *info;
20030+
20031+
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
20032+
20033+
info = _clutter_actor_get_animation_info_or_defaults (self);
20034+
if (info->transitions == NULL)
20035+
return FALSE;
20036+
20037+
return g_hash_table_size (info->transitions) > 0;
20038+
}
20039+
2002320040
/**
2002420041
* clutter_actor_save_easing_state:
2002520042
* @self: a #ClutterActor

clutter/clutter/clutter-muffin.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ void clutter_stage_get_device_coords (ClutterStage *stage,
8383
ClutterInputDevice *device,
8484
ClutterEventSequence *sequence,
8585
graphene_point_t *coords);
86+
87+
CLUTTER_EXPORT
88+
gboolean clutter_actor_has_transitions (ClutterActor *actor);
89+
8690
#undef __CLUTTER_H_INSIDE__
8791

8892
#endif /* __CLUTTER_MUFFIN_H__ */

0 commit comments

Comments
 (0)