From: Daniel Carl <danielcarl@gmx.de>
Date: Mon, 18 Nov 2019 22:33:08 +0000 (+0100)
Subject: Fix none working geolocation=always #580.
X-Git-Url: https://git.owens.tech/assets/dummy.html/assets/dummy.html/git?a=commitdiff_plain;h=0aa8552a6e4f3759c14cb355ee2fae4e6bd946ea;p=vimb.git

Fix none working geolocation=always #580.

The 'permission-request' return value is only used to identify if the
callback made a decision or not.
---

diff --git a/src/main.c b/src/main.c
index 9d4610e..ff1817b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2016,9 +2016,11 @@ static gboolean on_permission_request(WebKitWebView *webview,
         if (strcmp(geolocation_setting, "ask") == 0) {
             msg = "access your location";
         } else if (strcmp(geolocation_setting, "always") == 0) {
+            webkit_permission_request_allow(request);
             return TRUE;
         } else if (strcmp(geolocation_setting, "never") == 0) {
-            return FALSE;
+            webkit_permission_request_deny(request);
+            return TRUE;
         }
     } else if (WEBKIT_IS_USER_MEDIA_PERMISSION_REQUEST(request)) {
         if (webkit_user_media_permission_is_for_audio_device(WEBKIT_USER_MEDIA_PERMISSION_REQUEST(request))) {