mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 11:02:05 +00:00
clutter/actor: Pick frame clock of parent if not on any views
An actor may be placed without being on any current stage view; in this case, to get the ball rolling, walk up the actor tree to find the first actor where a frame clock can be picked from. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
This commit is contained in:
parent
f9be670522
commit
aa34f6ad7c
@ -16269,11 +16269,20 @@ clutter_actor_peek_stage_views (ClutterActor *self)
|
||||
ClutterFrameClock *
|
||||
clutter_actor_pick_frame_clock (ClutterActor *self)
|
||||
{
|
||||
ClutterActorPrivate *priv = self->priv;
|
||||
float max_refresh_rate = 0.0;
|
||||
ClutterStageView *best_view = NULL;
|
||||
GList *l;
|
||||
|
||||
for (l = self->priv->stage_views; l; l = l->next)
|
||||
if (!priv->stage_views)
|
||||
{
|
||||
if (priv->parent)
|
||||
return clutter_actor_pick_frame_clock (priv->parent);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (l = priv->stage_views; l; l = l->next)
|
||||
{
|
||||
ClutterStageView *view = l->data;
|
||||
float refresh_rate;
|
||||
|
Loading…
Reference in New Issue
Block a user