headerbar: Don't clean up other widget children

The parent of the title_widget is the center box,
it needs to call gtk_widget_unparent on it.
This commit is contained in:
Matthias Clasen 2020-05-11 14:25:57 -04:00
parent ea53b445a8
commit 495b9caf63

View File

@ -318,7 +318,8 @@ gtk_header_bar_set_title_widget (GtkHeaderBar *bar,
if (priv->title_widget == title_widget)
return;
g_clear_pointer (&priv->title_widget, gtk_widget_unparent);
gtk_center_box_set_center_widget (GTK_CENTER_BOX (priv->center_box), NULL);
priv->title_widget = NULL;
if (title_widget != NULL)
{