From 7817d0ec83b16dad6ad4f68039a58c371dbca38e Mon Sep 17 00:00:00 2001 From: "Eon S. Jeon" Date: Sat, 30 Sep 2017 00:34:35 +0900 Subject: Add support for WebGL Allows enabling and disabling WebGL support built into WebKit. The feature is turned off by default. --- config.def.h | 1 + surf.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/config.def.h b/config.def.h index 2e735bf..6748f8a 100644 --- a/config.def.h +++ b/config.def.h @@ -46,6 +46,7 @@ static Parameter defconfig[ParameterLast] = { [SpellLanguages] = { { .v = ((char *[]){ "en_US", NULL }) }, }, [StrictTLS] = { { .i = 1 }, }, [Style] = { { .i = 1 }, }, + [WebGL] = { { .i = 0 }, }, [ZoomLevel] = { { .f = 1.0 }, }, }; diff --git a/surf.c b/surf.c index 0f8b9c9..95b09be 100644 --- a/surf.c +++ b/surf.c @@ -79,6 +79,7 @@ typedef enum { SpellLanguages, StrictTLS, Style, + WebGL, ZoomLevel, ParameterLast } ParamName; @@ -820,6 +821,9 @@ setparameter(Client *c, int refresh, ParamName p, const Arg *a) setstyle(c, getstyle(geturi(c))); refresh = 0; break; + case WebGL: + webkit_settings_set_enable_webgl(s, a->i); + break; case ZoomLevel: webkit_web_view_set_zoom_level(c->view, a->f); return; /* do not update */ @@ -1079,6 +1083,7 @@ newview(Client *c, WebKitWebView *rv) "enable-accelerated-2d-canvas", curconfig[AcceleratedCanvas].val.i, "enable-site-specific-quirks", curconfig[SiteQuirks].val.i, "enable-smooth-scrolling", curconfig[SmoothScrolling].val.i, + "enable-webgl", curconfig[WebGL].val.i, "media-playback-requires-user-gesture", curconfig[MediaManualPlay].val.i, NULL); /* For more interesting settings, have a look at -- cgit v1.2.3 From d2e4989c3c5a50bffe56030b6af85f747b39a4f9 Mon Sep 17 00:00:00 2001 From: nzl Date: Thu, 22 Feb 2018 03:26:06 +0800 Subject: Script text shouldn't go through formatted conversion --- surf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/surf.c b/surf.c index 95b09be..f01a91c 100644 --- a/surf.c +++ b/surf.c @@ -921,7 +921,7 @@ runscript(Client *c) gsize l; if (g_file_get_contents(scriptfile, &script, &l, NULL) && l) - evalscript(c, script); + evalscript(c, "%s", script); g_free(script); } -- cgit v1.2.3 From 81f0452bc6c2a110239fa303ad1e72f11c33dc94 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Thu, 16 Nov 2017 23:18:05 +0100 Subject: Document SIGHUP in manpage --- surf.1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/surf.1 b/surf.1 index 711a9aa..45c31bb 100644 --- a/surf.1 +++ b/surf.1 @@ -306,6 +306,9 @@ string. .TP .B http_proxy If this variable is set and not empty upon startup, surf will use it as the http proxy. +.SH SIGNALS +Surf will reload the current page on +.BR SIGHUP . .SH PLUGINS For using plugins in surf, first determine your running architecture. Then get the appropriate plugin for that architecture and copy it to -- cgit v1.2.3