[gtk+] iconhelper: clear the surface on invalidation



commit ab88110b5111ab20bba40528b0323ca516ad63e8
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Aug 3 18:03:52 2013 +0200

    iconhelper: clear the surface on invalidation
    
    This was missed during the pixbuf->surface conversion, so when the state
    changed we were not recreating a new surface for it.

 gtk/gtkiconhelper.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index a159f06..d753198 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -100,6 +100,11 @@ void
 _gtk_icon_helper_invalidate (GtkIconHelper *self)
 {
   g_clear_object (&self->priv->rendered_pixbuf);
+  if (self->priv->rendered_surface != NULL)
+    {
+      cairo_surface_destroy (self->priv->rendered_surface);
+      self->priv->rendered_surface = NULL;
+    }
 }
 
 void


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