From: Daniel Carl Date: Wed, 14 Jun 2017 20:10:04 +0000 (+0200) Subject: Use web context of the webview instead of default. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=f9ce5ccd4e2943c77cab03c3bb9ec21fe49f6c9d;p=vimb.git Use web context of the webview instead of default. This should not make any difference at the time but we are free to use custom web context later. --- diff --git a/src/main.c b/src/main.c index 5d01268..e54b8de 100644 --- a/src/main.c +++ b/src/main.c @@ -1673,6 +1673,7 @@ static WebKitWebView *webview_new(Client *c, WebKitWebView *webview) { WebKitWebView *new; WebKitUserContentManager *ucm; + WebKitWebContext *webcontext; /* create a new webview */ if (webview) { @@ -1698,7 +1699,8 @@ static WebKitWebView *webview_new(Client *c, WebKitWebView *webview) NULL ); - g_signal_connect(webkit_web_context_get_default(), "download-started", G_CALLBACK(on_webctx_download_started), c); + webcontext = webkit_web_view_get_context(new); + g_signal_connect(webcontext, "download-started", G_CALLBACK(on_webctx_download_started), c); /* Setup script message handlers. */ webkit_user_content_manager_register_script_message_handler(ucm, "focus");