Bug 581150 - GtkIconView tries to paint items with invalid sizes

Run gtk_icon_view_layout() if necessary before attempting to paint the
icon view items during an expose event.  This ensures all the items have
valid sizes, as some themes don't take kindly to negative dimensions.
This commit is contained in:
Matthew Barnes 2009-10-23 19:32:25 -04:00
parent 42ac226877
commit 13d968adbe

View File

@ -1545,6 +1545,11 @@ gtk_icon_view_expose (GtkWidget *widget,
if (expose->window != icon_view->priv->bin_window)
return FALSE;
/* If a layout has been scheduled, do it now so that all
* cell view items have valid sizes before we proceed. */
if (icon_view->priv->layout_idle_id != 0)
gtk_icon_view_layout (icon_view);
cr = gdk_cairo_create (icon_view->priv->bin_window);
cairo_set_line_width (cr, 1.);