summaryrefslogtreecommitdiff
path: root/browser.c
diff options
context:
space:
mode:
authorPeter Hofmann <scm@uninformativ.de>2017-04-21 16:15:14 +0200
committerPeter Hofmann <scm@uninformativ.de>2017-04-21 16:15:57 +0200
commit7f3ff1f14b2b9e1633f9ffc6cf41a08b7c9b2345 (patch)
treef94b255fb4db255b8cde3fca494e1ca23a7dc03f /browser.c
parent6e46860725917a794a9307f00f266b2be8848244 (diff)
downloadlariza-7f3ff1f14b2b9e1633f9ffc6cf41a08b7c9b2345.tar.gz
Add option to enable WebGL
CC #36.
Diffstat (limited to 'browser.c')
-rw-r--r--browser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/browser.c b/browser.c
index 6902b41..02b20d2 100644
--- a/browser.c
+++ b/browser.c
@@ -75,6 +75,7 @@ static gboolean cooperative_alone = TRUE;
static gboolean cooperative_instances = TRUE;
static int cooperative_pipe_fp = 0;
static gchar *download_dir = "/var/tmp";
+static gboolean enable_webgl = FALSE;
static Window embed = 0;
static gchar *fifo_suffix = "main";
static gdouble global_zoom = 1.0;
@@ -203,6 +204,9 @@ client_new(const gchar *uri, WebKitWebView *related_wv, gboolean show)
g_object_set(G_OBJECT(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view))),
"user-agent", user_agent, NULL);
+ if (enable_webgl)
+ webkit_settings_set_enable_webgl(webkit_web_view_get_settings(WEBKIT_WEB_VIEW(c->web_view)), TRUE);
+
c->location = gtk_entry_new();
g_signal_connect(G_OBJECT(c->location), "key-press-event",
G_CALLBACK(key_location), c);
@@ -587,6 +591,10 @@ grab_environment_configuration(void)
if (e != NULL)
download_dir = g_strdup(e);
+ e = g_getenv(__NAME_UPPERCASE__"_ENABLE_EXPERIMENTAL_WEBGL");
+ if (e != NULL)
+ enable_webgl = TRUE;
+
e = g_getenv(__NAME_UPPERCASE__"_FIFO_SUFFIX");
if (e != NULL)
fifo_suffix = g_strdup(e);