Commit 6d3b4d93 authored by Benjamin Otte's avatar Benjamin Otte

stylecontext: Add a flag to force style_updated() emission

This is used in gtk_widget_reset_style() (via GTK_CSS_CHANGE_ANY) now,
and that makes GtkSettings font related changes work again.
parent d3143779
......@@ -49,10 +49,11 @@ typedef enum { /*< skip >*/
GTK_CSS_CHANGE_PARENT_SIBLING_STATE = (1 << 15),
/* add more */
GTK_CSS_CHANGE_SOURCE = (1 << 16),
GTK_CSS_CHANGE_ANIMATE = (1 << 17)
GTK_CSS_CHANGE_ANIMATE = (1 << 17),
GTK_CSS_CHANGE_FORCE_INVALIDATE = (1 << 18)
} GtkCssChange;
#define GTK_CSS_CHANGE_ANY ((1 << 18) - 1)
#define GTK_CSS_CHANGE_ANY ((1 << 19) - 1)
#define GTK_CSS_CHANGE_ANY_SELF (GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_POSITION | GTK_CSS_CHANGE_STATE)
#define GTK_CSS_CHANGE_ANY_SIBLING (GTK_CSS_CHANGE_SIBLING_CLASS | GTK_CSS_CHANGE_SIBLING_NAME | \
GTK_CSS_CHANGE_SIBLING_POSITION | GTK_CSS_CHANGE_SIBLING_STATE)
......
......@@ -3180,7 +3180,7 @@ _gtk_style_context_validate (GtkStyleContext *context,
_gtk_bitmask_free (animation_changes);
}
if (!_gtk_bitmask_is_empty (changes))
if (!_gtk_bitmask_is_empty (changes) || (change & GTK_CSS_CHANGE_FORCE_INVALIDATE))
gtk_style_context_do_invalidate (context);
change = _gtk_css_change_for_child (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