summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--surf.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/surf.c b/surf.c
index af994bb..c9a036a 100644
--- a/surf.c
+++ b/surf.c
@@ -130,8 +130,8 @@ static void die(const char *errstr, ...);
static void eval(Client *c, const Arg *arg);
static void find(Client *c, const Arg *arg);
static void fullscreen(Client *c, const Arg *arg);
-static void geopolicyrequested(WebKitWebView *v, WebKitWebFrame *f,
- WebKitGeolocationPolicyDecision *d, Client *c);
+static gboolean permissionrequested(WebKitWebView *v,
+ WebKitPermissionRequest *r, Client *c);
static const char *getatom(Client *c, int a);
static void gettogglestat(Client *c);
static void getpagestat(Client *c);
@@ -527,14 +527,18 @@ fullscreen(Client *c, const Arg *arg)
c->fullscreen = !c->fullscreen;
}
-void
-geopolicyrequested(WebKitWebView *v, WebKitWebFrame *f,
- WebKitGeolocationPolicyDecision *d, Client *c)
+gboolean
+permissionrequested(WebKitWebView *v, WebKitPermissionRequest *r, Client *c)
{
- if (allowgeolocation)
- webkit_geolocation_policy_allow(d);
- else
- webkit_geolocation_policy_deny(d);
+ if (WEBKIT_IS_GEOLOCATION_PERMISSION_REQUEST(r)) {
+ if (allowgeolocation)
+ webkit_permission_request_allow(r);
+ else
+ webkit_permission_request_deny(r);
+ return TRUE;
+ }
+
+ return FALSE;
}
const char *
@@ -883,8 +887,8 @@ newview(Client *c, WebKitWebView *rv)
"mouse-target-changed",
G_CALLBACK(mousetargetchanged), c);
g_signal_connect(G_OBJECT(v),
- "geolocation-policy-decision-requested",
- G_CALLBACK(geopolicyrequested), c);
+ "permission-request",
+ G_CALLBACK(permissionrequested), c);
g_signal_connect(G_OBJECT(v),
"create-web-view",
G_CALLBACK(createwindow), c);
w.gravatar.com/avatar/cfc8de1759d4fb94d4fe17b6e46f1ece?s=13&d=retro' width='13' height='13' alt='Gravatar' /> Hiltjo Posthuma 1-1/+1 2015-09-27config.mk: improve feature test checkGravatar Hiltjo Posthuma 1-1/+1 2015-08-06Fixed typo introduced by shared codeGravatar Eric Pruitt 1-1/+1 2015-07-19stest: get rid of getopt, use suckless arg.hGravatar Hiltjo Posthuma 3-53/+141 2015-07-19config.mk: add FREETYPELIBS and FREETYPEINCGravatar Hiltjo Posthuma 1-3/+9 2015-07-19fix prompt color style how it used to beGravatar Hiltjo Posthuma 1-1/+1 2015-06-27Use libdraw: add Xft and fallback-fonts support to graphics libGravatar Hiltjo Posthuma 11-316/+684 2014-09-17applied Hiltjo's patch as suggested on the ml to fix ControlMask for C-j and C-mGravatar Anselm R Garbe 2-2/+5 2014-07-30fix crash with ctrl-enter as inputGravatar Hiltjo Posthuma 1-1/+2 2014-05-29updated copyright notices in LICENSE and dmenu.c fileGravatar Anselm R Garbe 2-2/+2 2013-08-13applied Martin Kühl's inverse matching flag to stestGravatar Anselm R Garbe 2-4/+7 2013-08-02applied Martti Kühne's dmenu monitor patchGravatar Anselm R Garbe 3-4/+14 2013-06-28accepted vi'is exit approach ^[ (suggested by Arkaduisz)Gravatar Anselm R Garbe 1-0/+2