]> git.eshelyaron.com Git - emacs.git/commitdiff
Attach download-started signals to correct WebKit context
authorPo Lu <luangruo@yahoo.com>
Sun, 21 Nov 2021 03:14:14 +0000 (11:14 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 21 Nov 2021 03:14:14 +0000 (11:14 +0800)
* src/xwidget.c (Fmake_xwidget): Use correct context.

src/xwidget.c

index 35e359458bc07c380658d87c30c3dd2a4c1308e1..b0ff142bc73575eb63ca850a6663748e8014fe26 100644 (file)
@@ -197,6 +197,10 @@ fails.  */)
              xw->widget_osr = webkit_web_view_new_with_context (ctx);
              g_object_unref (ctx);
 
+             g_signal_connect (G_OBJECT (ctx),
+                               "download-started",
+                               G_CALLBACK (webkit_download_cb), xw);
+
              webkit_web_view_load_uri (WEBKIT_WEB_VIEW (xw->widget_osr),
                                        "about:blank");
              /* webkitgtk uses GSubprocess which sets sigaction causing
@@ -252,10 +256,6 @@ fails.  */)
                             "load-changed",
                             G_CALLBACK (webkit_view_load_changed_cb), xw);
 
-          g_signal_connect (G_OBJECT (webkit_context),
-                            "download-started",
-                            G_CALLBACK (webkit_download_cb), xw);
-
           g_signal_connect (G_OBJECT (xw->widget_osr),
                             "decide-policy",
                             G_CALLBACK