[gtk+/gtk-3-0] window: Only draw resize grip if its window exists



commit 847df205ede7f624c2bc4c4498495352cc865423
Author: Benjamin Otte <otte redhat com>
Date:   Mon May 23 15:46:59 2011 +0200

    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 0cf31b35eb10cb5bc08048ecdc141c949efec4cc

 gtk/gtkwindow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index b97418a..b1caa9b 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7304,7 +7304,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;



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