From 0aa8552a6e4f3759c14cb355ee2fae4e6bd946ea Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 18 Nov 2019 23:33:08 +0100 Subject: [PATCH] Fix none working geolocation=always #580. The 'permission-request' return value is only used to identify if the callback made a decision or not. --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))) { -- 2.20.1