mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-08 03:30:17 +00:00
stylecontext: Keep the main style data around until revalidation
This commit is contained in:
parent
751187aa0c
commit
40982eabbb
@ -1055,9 +1055,11 @@ gtk_style_context_queue_invalidate_internal (GtkStyleContext *context,
|
|||||||
GtkStyleContextPrivate *priv = context->priv;
|
GtkStyleContextPrivate *priv = context->priv;
|
||||||
GtkStyleInfo *info = priv->info_stack->data;
|
GtkStyleInfo *info = priv->info_stack->data;
|
||||||
|
|
||||||
|
if (gtk_style_context_is_saved (context))
|
||||||
|
{
|
||||||
info->data = NULL;
|
info->data = NULL;
|
||||||
|
}
|
||||||
if (!gtk_style_context_is_saved (context))
|
else
|
||||||
{
|
{
|
||||||
_gtk_style_context_queue_invalidate (context, GTK_CSS_CHANGE_STATE);
|
_gtk_style_context_queue_invalidate (context, GTK_CSS_CHANGE_STATE);
|
||||||
/* XXX: We need to invalidate siblings here somehow */
|
/* XXX: We need to invalidate siblings here somehow */
|
||||||
@ -3342,8 +3344,10 @@ _gtk_style_context_validate (GtkStyleContext *context,
|
|||||||
|
|
||||||
if (priv->relevant_changes & change)
|
if (priv->relevant_changes & change)
|
||||||
{
|
{
|
||||||
|
GtkStyleInfo *info = priv->info_stack->data;
|
||||||
gboolean clear_cache = ((priv->relevant_changes & change) & ~GTK_STYLE_CONTEXT_CACHED_CHANGE) != 0;
|
gboolean clear_cache = ((priv->relevant_changes & change) & ~GTK_STYLE_CONTEXT_CACHED_CHANGE) != 0;
|
||||||
|
|
||||||
|
info->data = NULL;
|
||||||
gtk_style_context_do_invalidate (context, clear_cache);
|
gtk_style_context_do_invalidate (context, clear_cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user