window: Allow unsetting custom titlebar

https://bugzilla.gnome.org/show_bug.cgi?id=720059
This commit is contained in:
William Jon McCann 2014-01-10 15:25:27 -05:00 committed by Matthias Clasen
parent 24aa40ed35
commit 8db2ba425a

View File

@ -3615,7 +3615,7 @@ on_titlebar_title_notify (GtkHeaderBar *titlebar,
/**
* gtk_window_set_titlebar:
* @window: a #GtkWindow
* @titlebar: the widget to use as titlebar
* @titlebar: (allow-none): the widget to use as titlebar
*
* Sets a custom titlebar for @window.
*
@ -3639,6 +3639,13 @@ gtk_window_set_titlebar (GtkWindow *window,
unset_titlebar (window);
if (titlebar == NULL)
{
priv->custom_title = FALSE;
priv->client_decorated = FALSE;
return;
}
if (gdk_window_supports_csd (window))
gdk_window_enable_csd (window);
else