summaryrefslogtreecommitdiff
path: root/gtk/gtkcssnode.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-01-17 22:00:21 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-17 23:47:34 -0500
commit1e7705c08e8df29952b052436259d624f4ea5525 (patch)
tree8899211a8ea710c7ad121c10b7015f266ffe6255 /gtk/gtkcssnode.c
parentcc3cf581ab064f989613116705395f6ce71c6070 (diff)
downloadgtk+-1e7705c08e8df29952b052436259d624f4ea5525.tar.gz
cssnode: Fix a corner case in style computation
When we recomputed the change flags, and the style did not change, we still need to replace the style object, since it holds the new change flags.
Diffstat (limited to 'gtk/gtkcssnode.c')
-rw-r--r--gtk/gtkcssnode.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index b921b8ba73..ad3b707f60 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -930,12 +930,17 @@ gtk_css_node_set_style (GtkCssNode *cssnode,
{
g_signal_emit (cssnode, cssnode_signals[STYLE_CHANGED], 0, &change);
}
- else if (cssnode->style != style &&
- (GTK_IS_CSS_ANIMATED_STYLE (cssnode->style) || GTK_IS_CSS_ANIMATED_STYLE (style)))
+ else if (GTK_IS_CSS_ANIMATED_STYLE (cssnode->style) || GTK_IS_CSS_ANIMATED_STYLE (style))
{
/* This is when animations are starting/stopping but they didn't change any CSS this frame */
g_set_object (&cssnode->style, style);
}
+ else if (gtk_css_static_style_get_change (gtk_css_style_get_static_style (cssnode->style)) !=
+ gtk_css_static_style_get_change (gtk_css_style_get_static_style (style)))
+ {
+ /* This is when we recomputed the change flags but the style didn't change */
+ g_set_object (&cssnode->style, style);
+ }
gtk_css_style_change_finish (&change);