[gtk+/wip/cssvalue: 81/164] stylecontext: Keep the main style data around until revalidation
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/cssvalue: 81/164] stylecontext: Keep the main style data around until revalidation
- Date: Wed, 11 Apr 2012 14:46:43 +0000 (UTC)
commit 7d80a220c3aa17612bdba3d7990320af8f64d4bb
Author: Benjamin Otte <otte redhat com>
Date: Thu Mar 29 15:43:35 2012 +0200
stylecontext: Keep the main style data around until revalidation
gtk/gtkstylecontext.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index afcdb65..5f25f62 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1055,9 +1055,11 @@ gtk_style_context_queue_invalidate_internal (GtkStyleContext *context,
GtkStyleContextPrivate *priv = context->priv;
GtkStyleInfo *info = priv->info_stack->data;
- info->data = NULL;
-
- if (!gtk_style_context_is_saved (context))
+ if (gtk_style_context_is_saved (context))
+ {
+ info->data = NULL;
+ }
+ else
{
_gtk_style_context_queue_invalidate (context, GTK_CSS_CHANGE_STATE);
/* XXX: We need to invalidate siblings here somehow */
@@ -3345,8 +3347,10 @@ _gtk_style_context_validate (GtkStyleContext *context,
if (priv->relevant_changes & change)
{
+ GtkStyleInfo *info = priv->info_stack->data;
gboolean clear_cache = ((priv->relevant_changes & change) & ~GTK_STYLE_CONTEXT_CACHED_CHANGE) != 0;
+ info->data = NULL;
gtk_style_context_do_invalidate (context, clear_cache);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]