window: Only draw resize grip if its window exists

Don't rely on priv->resize_grip_visible as the code comment in the
variable declaration indicates.
This fixes warnings with GtkPlug, which can cause resize_grip_visible to
be TRUE but grid_window to be NULL - running tests/teststatusicon
reproduces this.

This broke with 7ef113ce56
This commit is contained in:
Benjamin Otte 2011-05-23 15:46:59 +02:00
parent f30efa7759
commit 97a8ff80cc

View File

@ -7400,7 +7400,7 @@ gtk_window_draw (GtkWidget *widget,
if (GTK_WIDGET_CLASS (gtk_window_parent_class)->draw)
ret = GTK_WIDGET_CLASS (gtk_window_parent_class)->draw (widget, cr);
if (priv->resize_grip_visible &&
if (priv->grip_window &&
gtk_cairo_should_draw_window (cr, priv->grip_window))
{
GdkRectangle rect;