commit: 52a75160abed353df818f26929e3bbf99382a660
parent 5145eae758d3817c7bcc1a589514624bb62819e1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 10 Apr 2021 18:12:09 +0200
badwolf: Connect to WebContext only when created
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/badwolf.c b/badwolf.c
@@ -683,6 +683,12 @@ new_browser(struct Window *window, const gchar *target_url, struct Client *old_b
webkit_web_context_set_process_model(web_context,
WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
webkit_web_context_set_web_extensions_directory(web_context, web_extensions_directory);
+
+ g_signal_connect(G_OBJECT(web_context),
+ "download-started",
+ G_CALLBACK(web_contextCb_download_started),
+ browser);
+
}
else
{
@@ -870,12 +876,6 @@ new_browser(struct Window *window, const gchar *target_url, struct Client *old_b
browser);
g_signal_connect(browser->webView, "load-changed", G_CALLBACK(WebViewCb_load_changed), browser);
- /* signals for WebView's WebContext */
- g_signal_connect(G_OBJECT(web_context),
- "download-started",
- G_CALLBACK(web_contextCb_download_started),
- browser);
-
/* signals for search widget */
g_signal_connect(browser->search, "next-match", G_CALLBACK(SearchEntryCb_next__match), browser);
g_signal_connect(