[gtk+/gtk-style-context: 193/276] GtkWidget: Update GtkStyleContext animation regions on allocation change.



commit b784e750729783cc5cfc1469eb497286ab4e8576
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 19 22:42:16 2010 +0200

    GtkWidget: Update GtkStyleContext animation regions on allocation change.

 gtk/gtkwidget.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index dae22ad..56eb91c 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4751,6 +4751,14 @@ gtk_widget_size_allocate (GtkWidget	*widget,
 	      cairo_region_destroy (invalidate);
 	    }
 	}
+
+      if (size_changed || position_changed)
+        {
+          GtkStyleContext *context;
+
+          context = gtk_widget_get_style_context (widget);
+          _gtk_style_context_invalidate_animation_areas (context);
+        }
     }
 
   if ((size_changed || position_changed) && priv->parent &&
@@ -5723,6 +5731,7 @@ gtk_widget_send_expose (GtkWidget *widget,
   cairo_t *cr;
   int x, y;
   gboolean do_clip;
+  GtkStyleContext *context;
 
   g_return_val_if_fail (GTK_IS_WIDGET (widget), TRUE);
   g_return_val_if_fail (gtk_widget_get_realized (widget), TRUE);
@@ -5747,6 +5756,9 @@ gtk_widget_send_expose (GtkWidget *widget,
   gtk_cairo_set_event (cr, NULL);
   cairo_destroy (cr);
 
+  context = gtk_widget_get_style_context (widget);
+  _gtk_style_context_coalesce_animation_areas (context);
+
   return result;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]