csd: Implement hide-titlebar-when-maximized

This commit is contained in:
Matthias Clasen 2013-04-06 17:24:29 -04:00
parent acf56b6cb3
commit e47689d9ea

View File

@ -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;