[gtk+] stylecontext: Handle theme changes for cached styles
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] stylecontext: Handle theme changes for cached styles
- Date: Wed, 7 Jan 2015 17:08:49 +0000 (UTC)
commit 29984c5282d1b47345b5b6627f796aa6cb34c752
Author: Benjamin Otte <otte redhat com>
Date: Wed Jan 7 18:06:59 2015 +0100
stylecontext: Handle theme changes for cached styles
We need to clear the cache manually on full revalidates because
_gtk_css_change_for_child() will clear the full revalidation flags.
And then gtk_style_context_update_cache() will not do the right thing
(which is to clear itself).
gtk/gtkstylecontext.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index eeb3022..4e91e84 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -2842,7 +2842,7 @@ gtk_style_context_update_cache (GtkStyleContext *context,
GtkCssStyle *parent;
gpointer key, value;
- if (_gtk_bitmask_is_empty (parent_changes))
+ if (change == 0 && _gtk_bitmask_is_empty (parent_changes))
return;
priv = context->priv;
@@ -2951,6 +2951,8 @@ _gtk_style_context_validate (GtkStyleContext *context,
g_object_unref (static_style);
g_object_unref (style);
+
+ gtk_style_context_clear_cache (context);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]