diff options
author | Benjamin Otte <otte@redhat.com> | 2015-02-21 00:15:04 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-03-18 15:23:32 +0100 |
commit | fbe796f293dd3ac6f06aa156121d3cde3cb673a2 (patch) | |
tree | f68ee91cd5ccae7df35400343fb768d7b882c6dc /gtk/gtkcssanimatedstyle.c | |
parent | 2ec26cd9b5a628b128fa6264ff43d27f6b4ca1ea (diff) | |
download | gtk+-fbe796f293dd3ac6f06aa156121d3cde3cb673a2.tar.gz |
cssstyle: Handle 0 timestamp to mean "don't animate"
Diffstat (limited to 'gtk/gtkcssanimatedstyle.c')
-rw-r--r-- | gtk/gtkcssanimatedstyle.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtkcssanimatedstyle.c b/gtk/gtkcssanimatedstyle.c index 4583d8cc71..6e845f689e 100644 --- a/gtk/gtkcssanimatedstyle.c +++ b/gtk/gtkcssanimatedstyle.c @@ -410,6 +410,9 @@ gtk_css_animated_style_new (GtkCssStyle *base_style, gtk_internal_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), NULL); gtk_internal_return_val_if_fail (previous_style == NULL || GTK_IS_CSS_STYLE (previous_style), NULL); + if (timestamp == 0) + return g_object_ref (base_style); + animations = NULL; if (previous_style != NULL) @@ -441,6 +444,9 @@ gtk_css_animated_style_new_advance (GtkCssAnimatedStyle *source, gtk_internal_return_val_if_fail (GTK_IS_CSS_ANIMATED_STYLE (source), NULL); gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (base), NULL); + if (timestamp == 0) + return g_object_ref (source->style); + animations = NULL; for (l = source->animations; l; l = l->next) { |