forked from AuroraMiddleware/gtk
stylecontext: Clear animations for values kept in cache
This commit is contained in:
parent
37dac2a481
commit
13cbd22d17
@ -565,3 +565,19 @@ _gtk_css_computed_values_is_static (GtkCssComputedValues *values)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_css_computed_values_cancel_animations (GtkCssComputedValues *values)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CSS_COMPUTED_VALUES (values));
|
||||
|
||||
if (values->animated_values)
|
||||
{
|
||||
g_ptr_array_unref (values->animated_values);
|
||||
values->animated_values = NULL;
|
||||
}
|
||||
|
||||
g_slist_free_full (values->animations, g_object_unref);
|
||||
values->animations = NULL;
|
||||
}
|
||||
|
||||
|
@ -94,6 +94,7 @@ void _gtk_css_computed_values_create_animations (GtkCssCom
|
||||
GtkStyleContext *context);
|
||||
GtkBitmask * _gtk_css_computed_values_advance (GtkCssComputedValues *values,
|
||||
gint64 timestamp);
|
||||
void _gtk_css_computed_values_cancel_animations (GtkCssComputedValues *values);
|
||||
gboolean _gtk_css_computed_values_is_static (GtkCssComputedValues *values);
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -3173,6 +3173,9 @@ _gtk_style_context_validate (GtkStyleContext *context,
|
||||
change |= GTK_CSS_CHANGE_ANIMATE;
|
||||
|
||||
changes = _gtk_css_computed_values_get_difference (data->store, current->store);
|
||||
|
||||
/* In the case where we keep the cache, we want unanimated values */
|
||||
_gtk_css_computed_values_cancel_animations (current->store);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user