Commit eb97ef05 authored by Benjamin Otte's avatar Benjamin Otte

cssnode: Set new style if it's animated

In commit 2c613166 we avoided emitting
the style-changed signal if no CSS property changed.

Unfortunately, this also caused CSS styles to not be updated when
animations started if those animations did not change any CSS value
immediately. In those cases the animation would just never start.
The obvious example was the spinner.
parent b22a07ec
......@@ -959,7 +959,16 @@ gtk_css_node_set_style (GtkCssNode *cssnode,
style_changed = gtk_css_style_change_has_change (&change);
if (style_changed)
g_signal_emit (cssnode, cssnode_signals[STYLE_CHANGED], 0, &change);
g_signal_emit (cssnode, cssnode_signals[STYLE_CHANGED], 0, &change);
else if (cssnode->style != style &&
/* This is when animations are starting/stopping but they didn't change any CSS this frame */
g_object_unref (cssnode->style);
cssnode->style = g_object_ref (style);
gtk_css_style_change_finish (&change);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment