[gtk+] stylecontext: If we force invalidate, invalidate all properties
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] stylecontext: If we force invalidate, invalidate all properties
- Date: Tue, 12 Mar 2013 11:47:14 +0000 (UTC)
commit fb170239c7cdd19ff43946b262527b062e939bd0
Author: Benjamin Otte <otte redhat com>
Date: Tue Mar 12 12:44:03 2013 +0100
stylecontext: If we force invalidate, invalidate all properties
We only FORCE_INVALIDATE when something weird changes that the CSS
machinery can't detect. But now that our style_updated functions skip
recomputations when some properties don't change we want to make sure
these recomputations are still run. So we just claim all properties
changed.
http://bugzilla.gnome.org/show_bug.cgi?id=695482
gtk/gtkstylecontext.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index f5d1e86..ad182f2 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -3281,8 +3281,19 @@ _gtk_style_context_validate (GtkStyleContext *context,
_gtk_bitmask_free (animation_changes);
}
- if (!_gtk_bitmask_is_empty (changes) || (change & GTK_CSS_CHANGE_FORCE_INVALIDATE))
- gtk_style_context_do_invalidate (context, changes);
+ if (change & GTK_CSS_CHANGE_FORCE_INVALIDATE)
+ {
+ GtkBitmask *full = _gtk_bitmask_new ();
+ full = _gtk_bitmask_invert_range (full,
+ 0,
+ _gtk_css_style_property_get_n_properties ());
+ gtk_style_context_do_invalidate (context, full);
+ _gtk_bitmask_free (full);
+ }
+ else if (!_gtk_bitmask_is_empty (changes))
+ {
+ gtk_style_context_do_invalidate (context, changes);
+ }
change = _gtk_css_change_for_child (change);
for (list = priv->children; list; list = list->next)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]