[mutter] clutter/actor: Pick frame clock of parent if not on any views
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/actor: Pick frame clock of parent if not on any views
- Date: Thu, 2 Jul 2020 20:55:38 +0000 (UTC)
commit aa34f6ad7cb6b34c08d51ca3b209b938e728fa57
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Jun 10 15:05:10 2020 +0200
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
clutter/clutter/clutter-actor.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 1c323bc08d..354d36a426 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]