aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 62941358f..25f0f63b3 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1957,11 +1957,18 @@ close_web_view_cb (WebKitWebView *web_view,
gpointer user_data)
{
EphyEmbedContainer *window;
+ GList *children;
GtkWidget *widget = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
window = EPHY_EMBED_CONTAINER (widget);
- if (ephy_embed_container_get_is_popup (window))
+ children = ephy_embed_container_get_children (window);
+
+ if (g_list_length (children) == 1)
gtk_widget_destroy (GTK_WIDGET (window));
+ else
+ ephy_embed_container_remove_child (window, EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view));
+
+ g_list_free (children);
return TRUE;
}