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



commit 61ce7d3103e11fca127ec549cacfd016abf40aaf
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 |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 4d51c17..6375980 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4114,6 +4114,14 @@ gtk_widget_size_allocate (GtkWidget	*widget,
 	      gdk_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) && widget->parent &&
@@ -4803,12 +4811,20 @@ gint
 gtk_widget_send_expose (GtkWidget *widget,
 			GdkEvent  *event)
 {
+  GtkStyleContext *context;
+  gint retval;
+
   g_return_val_if_fail (GTK_IS_WIDGET (widget), TRUE);
   g_return_val_if_fail (gtk_widget_get_realized (widget), TRUE);
   g_return_val_if_fail (event != NULL, TRUE);
   g_return_val_if_fail (event->type == GDK_EXPOSE, TRUE);
 
-  return gtk_widget_event_internal (widget, event);
+  retval = gtk_widget_event_internal (widget, event);
+
+  context = gtk_widget_get_style_context (widget);
+  _gtk_style_context_coalesce_animation_areas (context);
+
+  return retval;
 }
 
 static gboolean



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