[gtk+/cellarea-style-transitions: 2/9] stylecontext: only coalesce transitions after they're referenced by a draw()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/cellarea-style-transitions: 2/9] stylecontext: only coalesce transitions after they're referenced by a draw()
- Date: Wed, 11 May 2011 13:29:30 +0000 (UTC)
commit 489b48ceb8dee34f9e38ad9361f1871e0e92bfbc
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue May 10 23:59:27 2011 +0200
stylecontext: only coalesce transitions after they're referenced by a draw()
If after calling _gtk_style_context_invalidate_animation_areas(), a widget
happened to draw() with a clipping area that left out some transition, it
would be left stuck with a NULL invalidation area.
gtk/gtkstylecontext.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 12654e5..dac71f7 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -3156,6 +3156,7 @@ _gtk_style_context_coalesce_animation_areas (GtkStyleContext *context,
GtkWidget *widget)
{
GtkStyleContextPrivate *priv;
+ gboolean validate = TRUE;
GSList *l;
priv = context->priv;
@@ -3179,7 +3180,10 @@ _gtk_style_context_coalesce_animation_areas (GtkStyleContext *context,
continue;
if (info->rectangles->len == 0)
- continue;
+ {
+ validate = FALSE;
+ continue;
+ }
info->invalidation_region = cairo_region_create ();
@@ -3194,7 +3198,8 @@ _gtk_style_context_coalesce_animation_areas (GtkStyleContext *context,
g_array_remove_range (info->rectangles, 0, info->rectangles->len);
}
- priv->animations_invalidated = FALSE;
+ if (validate)
+ priv->animations_invalidated = FALSE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]