[gtk+] csd: Ignore titlebars when hidden



commit d31391b0c702bbda5332df6497e73e3ec59ed2c3
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 12 20:53:41 2013 -0400

    csd: Ignore titlebars when hidden
    
    We were not drawing the content background in the titlebar
    area when fullscreen, and were still treating clicks there
    as if they were on the titlebar.

 gtk/gtkwindow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 8203a9e..12bfd6f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6994,7 +6994,7 @@ get_active_region_type (GtkWindow *window, GdkEventAny *event, gint x, gint y)
         return i;
     }
 
-  if (priv->title_box != NULL)
+  if (priv->title_box != NULL && gtk_widget_get_visible (priv->title_box))
     {
       gtk_widget_get_allocation (priv->title_box, &allocation);
       if (allocation.x <= x && allocation.x + allocation.width > x &&
@@ -8900,7 +8900,7 @@ gtk_window_draw (GtkWidget *widget,
           gtk_style_context_restore (context);
         }
 
-      if (priv->title_box)
+      if (priv->title_box && gtk_widget_get_visible (priv->title_box))
         title_height = gtk_widget_get_allocated_height (priv->title_box);
       else
         title_height = 0;


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