From: André Stösel Date: Sun, 25 Mar 2012 16:36:56 +0000 (+0200) Subject: Due to GtkOverlay there's another parent widget X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7d85602f84f43e20495f7a1150a9dda5b038eea;p=midori Due to GtkOverlay there's another parent widget --- diff --git a/midori/midori-view.c b/midori/midori-view.c index e8e6c221..4a9fb4ca 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -2793,7 +2793,11 @@ static gboolean webkit_web_view_web_view_ready_cb (GtkWidget* web_view, MidoriView* view) { + #if GTK_CHECK_VERSION(3, 2, 0) + GtkWidget* new_view = gtk_widget_get_parent (gtk_widget_get_parent (gtk_widget_get_parent (web_view))); + #else GtkWidget* new_view = gtk_widget_get_parent (gtk_widget_get_parent (web_view)); + #endif MidoriNewView where = MIDORI_NEW_VIEW_TAB; /* FIXME: Open windows opened by scripts in tabs if they otherwise