Make it possible to hide custom titlebars

Previously, we were showing and hiding the custom titlebar
widget in response to state changes such as maximization.
Instead, use gtk_widget_set_child_visible() and leave
show/hide to applications. This makes it possible to set
a custom titlebar and hide it, for a titlebar-less appearance.

https://bugzilla.gnome.org/show_bug.cgi?id=707132
This commit is contained in:
Matthias Clasen 2013-09-30 19:26:07 -04:00
parent 41b9a17dfc
commit c02a12a746

View File

@ -5141,12 +5141,12 @@ update_window_buttons (GtkWindow *window)
if (priv->fullscreen ||
(maximized && priv->hide_titlebar_when_maximized))
{
gtk_widget_hide (priv->title_box);
gtk_widget_set_child_visible (priv->title_box, FALSE);
return;
}
else
{
gtk_widget_show (priv->title_box);
gtk_widget_set_child_visible (priv->title_box, TRUE);
}
if (priv->titlebar == NULL)