Commit d74e1b9a authored by Benjamin Otte's avatar Benjamin Otte

stylecontext: Always create animations

Even when there is no current values, do create animations. This ensures
that animations do exist for unmapped widgets when they get mapped
later.
parent 4a281edc
......@@ -3147,6 +3147,8 @@ _gtk_style_context_validate (GtkStyleContext *context,
if (current == NULL ||
gtk_style_context_needs_full_revalidate (context, change))
{
StyleData *data;
if ((priv->relevant_changes & change) & ~GTK_STYLE_CONTEXT_CACHED_CHANGE)
{
gtk_style_context_clear_cache (context);
......@@ -3157,22 +3159,20 @@ _gtk_style_context_validate (GtkStyleContext *context,
style_info_set_data (info, NULL);
}
if (current)
{
StyleData *data;
data = style_data_lookup (context);
data = style_data_lookup (context);
_gtk_css_computed_values_create_animations (data->store,
timestamp,
gtk_style_context_should_create_transitions (context) ? current->store : NULL,
context);
if (_gtk_css_computed_values_is_static (data->store))
change &= ~GTK_CSS_CHANGE_ANIMATE;
else
change |= GTK_CSS_CHANGE_ANIMATE;
_gtk_style_context_update_animating (context);
_gtk_css_computed_values_create_animations (data->store,
timestamp,
current && gtk_style_context_should_create_transitions (context) ? current->store : NULL,
context);
if (_gtk_css_computed_values_is_static (data->store))
change &= ~GTK_CSS_CHANGE_ANIMATE;
else
change |= GTK_CSS_CHANGE_ANIMATE;
_gtk_style_context_update_animating (context);
if (current)
{
changes = _gtk_css_computed_values_get_difference (data->store, current->store);
/* In the case where we keep the cache, we want unanimated values */
......
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