summaryrefslogtreecommitdiff
path: root/gtk/gtkcsscomputedvalues.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-09-17 10:53:16 +0200
committerBenjamin Otte <otte@redhat.com>2012-09-17 20:40:01 +0200
commit13cbd22d178b571b8e0a3ebaf4bfecd007519069 (patch)
tree6e6c2113cd8cab216865724949bfdb425a378fe9 /gtk/gtkcsscomputedvalues.c
parent37dac2a481f25deab436ca965cecb172938bc18a (diff)
downloadgtk+-13cbd22d178b571b8e0a3ebaf4bfecd007519069.tar.gz
stylecontext: Clear animations for values kept in cache
Diffstat (limited to 'gtk/gtkcsscomputedvalues.c')
-rw-r--r--gtk/gtkcsscomputedvalues.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk/gtkcsscomputedvalues.c b/gtk/gtkcsscomputedvalues.c
index f9ec618c97..7ec040ea58 100644
--- a/gtk/gtkcsscomputedvalues.c
+++ b/gtk/gtkcsscomputedvalues.c
@@ -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;
+}
+