[gtk+] csd: Implement hide-titlebar-when-maximized



commit e47689d9ea79da850f219fbc0ca09672d619e3cf
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Apr 6 17:24:29 2013 -0400

    csd: Implement hide-titlebar-when-maximized

 gtk/gtkwindow.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6628ddd..c8359fc 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4998,13 +4998,19 @@ static void
 update_window_buttons (GtkWindow *window)
 {
   GtkWindowPrivate *priv = window->priv;
+  GdkWindow *win;
+  gboolean maximized = FALSE;
 
   if (priv->custom_title)
     return;
 
+  win = gtk_widget_get_window (GTK_WIDGET (window));
+  if (win != NULL)
+    maximized = gdk_window_get_state (win) & GDK_WINDOW_STATE_MAXIMIZED;
   if (priv->decorated &&
       priv->client_decorated &&
       !priv->fullscreen &&
+      !(maximized && priv->hide_titlebar_when_maximized) &&
       priv->title_box != NULL)
     {
       gchar *layout_desc;


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