From 3e04f1f7d26ae2392074fbb942dd8e1a0632bd52 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 7 Nov 2021 08:55:03 +0800 Subject: [PATCH] Fix web inspector * src/xwidget.c (Fmake_xwidget): Move developer extra initialization. --- src/xwidget.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xwidget.c b/src/xwidget.c index 5f013b7aadc..90aac4e0922 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -170,9 +170,6 @@ fails. */) || !XWIDGETP (related) || !EQ (XXWIDGET (related)->type, Qwebkit)) { - /* Enable the developer extras */ - settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (xw->widget_osr)); - g_object_set (G_OBJECT (settings), "enable-developer-extras", TRUE, NULL); xw->widget_osr = webkit_web_view_new (); /* webkitgtk uses GSubprocess which sets sigaction causing @@ -190,6 +187,10 @@ fails. */) related_view = WEBKIT_WEB_VIEW (XXWIDGET (related)->widget_osr); xw->widget_osr = webkit_web_view_new_with_related_view (related_view); } + + /* Enable the developer extras */ + settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (xw->widget_osr)); + g_object_set (G_OBJECT (settings), "enable-developer-extras", TRUE, NULL); } gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width, -- 2.39.5