]> spindle.queued.net Git - midori/commitdiff
Due to GtkOverlay there's another parent widget
authorAndré Stösel <andre@stoesel.de>
Sun, 25 Mar 2012 16:36:56 +0000 (18:36 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 25 Mar 2012 16:39:32 +0000 (18:39 +0200)
midori/midori-view.c

index e8e6c221e34548ccbf32c374ea9157b9cb008349..4a9fb4ca04fee361e3abc7962acbc08c2696dec0 100644 (file)
@@ -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