]> Pileus Git - ~andy/gtk/commitdiff
iconview: Don't draw unallocated items
authorBenjamin Otte <otte@redhat.com>
Wed, 9 May 2012 12:23:10 +0000 (14:23 +0200)
committerChristophe Fergeau <cfergeau@redhat.com>
Wed, 9 May 2012 12:23:10 +0000 (14:23 +0200)
This is more a workaround for Clutter-GTK than anything else. Most of
all, it makes gnome-boxes start again.

gtk/gtkiconview.c

index 93367b6415ca241a63493509f30b4949b0c23009..b30c379378c076fca5b64a23b4088cb62cf5a4ad 100644 (file)
@@ -2996,7 +2996,7 @@ gtk_icon_view_paint_item (GtkIconView     *icon_view,
   GtkIconViewPrivate *priv = icon_view->priv;
   GtkCellAreaContext *context;
 
-  if (priv->model == NULL)
+  if (priv->model == NULL || item->cell_area.width <= 0 || item->cell_area.height <= 0)
     return;
 
   _gtk_icon_view_set_cell_data (icon_view, item);