st/theme-node-transition: Pass actor when constructing timeline
Timelines now take an actor, to be able to derive an appropriate frame clock, so pass the one of the actor we're transitioning on. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1299
This commit is contained in:
parent
482c655590
commit
918b3eeb42
@ -84,10 +84,11 @@ on_timeline_new_frame (ClutterTimeline *timeline,
|
||||
}
|
||||
|
||||
StThemeNodeTransition *
|
||||
st_theme_node_transition_new (StThemeNode *from_node,
|
||||
st_theme_node_transition_new (ClutterActor *actor,
|
||||
StThemeNode *from_node,
|
||||
StThemeNode *to_node,
|
||||
StThemeNodePaintState *old_paint_state,
|
||||
guint duration)
|
||||
unsigned int duration)
|
||||
{
|
||||
StThemeNodeTransition *transition;
|
||||
g_return_val_if_fail (ST_IS_THEME_NODE (from_node), NULL);
|
||||
@ -103,7 +104,7 @@ st_theme_node_transition_new (StThemeNode *from_node,
|
||||
st_theme_node_paint_state_copy (&transition->priv->old_paint_state,
|
||||
old_paint_state);
|
||||
|
||||
transition->priv->timeline = clutter_timeline_new (duration);
|
||||
transition->priv->timeline = clutter_timeline_new_for_actor (actor, duration);
|
||||
|
||||
transition->priv->timeline_completed_id =
|
||||
g_signal_connect (transition->priv->timeline, "completed",
|
||||
|
@ -32,7 +32,8 @@ G_BEGIN_DECLS
|
||||
G_DECLARE_FINAL_TYPE (StThemeNodeTransition, st_theme_node_transition,
|
||||
ST, THEME_NODE_TRANSITION, GObject)
|
||||
|
||||
StThemeNodeTransition *st_theme_node_transition_new (StThemeNode *from_node,
|
||||
StThemeNodeTransition *st_theme_node_transition_new (ClutterActor *actor,
|
||||
StThemeNode *from_node,
|
||||
StThemeNode *to_node,
|
||||
StThemeNodePaintState *old_paint_state,
|
||||
guint duration);
|
||||
|
@ -1687,7 +1687,8 @@ st_widget_recompute_style (StWidget *widget,
|
||||
*/
|
||||
|
||||
priv->transition_animation =
|
||||
st_theme_node_transition_new (old_theme_node,
|
||||
st_theme_node_transition_new (CLUTTER_ACTOR (widget),
|
||||
old_theme_node,
|
||||
new_theme_node,
|
||||
current_paint_state (widget),
|
||||
transition_duration);
|
||||
|
Loading…
Reference in New Issue
Block a user