MidoriBrowser* browser)
{
GtkWidget* widget = midori_browser_get_current_tab (browser);
- if (gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), 1) == NULL &&
- midori_view_is_blank (MIDORI_VIEW (widget)))
+ gboolean last_tab =
+ gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), 1) == NULL;
+ if (last_tab && sokoke_is_app_or_private ())
{
+ gtk_widget_destroy (GTK_WIDGET (browser));
return;
}
+ if (last_tab && midori_view_is_blank (MIDORI_VIEW (widget)))
+ return;
gtk_widget_destroy (widget);
}