sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 99f5654ee3ddf10bc95ecedd11d50f062cafa15e
parent 5b365248b9c2af7fb645d27c5d424534e426ddb1
Author: Christoph Lohmann <20h@r-36.net>
Date:   Mon, 11 Mar 2013 21:28:00 +0100

Kiosk mode is now in vanilla surf.

Diffstat:
Msurf.suckless.org/files/kioskmode.md | 3---
Dsurf.suckless.org/patches/surf-kiosk.diff | 86-------------------------------------------------------------------------------
2 files changed, 0 insertions(+), 89 deletions(-)

diff --git a/surf.suckless.org/files/kioskmode.md b/surf.suckless.org/files/kioskmode.md @@ -19,9 +19,6 @@ This software has to be installed on the system for my whoto to work: Feel free to use other components if desired. -I do apply a patch to 'surf' that adds parameter '-k' and disables all -key strokes. See the [patches](../patches/kioskmode) section for the patch. - Basic setup ----------- diff --git a/surf.suckless.org/patches/surf-kiosk.diff b/surf.suckless.org/patches/surf-kiosk.diff @@ -1,86 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index d9a2be9..adfa7a6 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -8,6 +8,7 @@ static char *cookiefile = "~/.surf/cookies.txt"; - static time_t sessiontime = 3600; - static char *cafile = "/etc/ssl/certs/ca-certificates.crt"; - static char *strictssl = FALSE; /* Refuse untrusted SSL connections */ -+static Bool kioskmode = FALSE; - - /* Webkit default features */ - static Bool enablescrollbars = TRUE; -diff --git a/surf.1 b/surf.1 -index 97c00f0..c228fbd 100644 ---- a/surf.1 -+++ b/surf.1 -@@ -32,6 +32,9 @@ Reparents to window specified by - .B \-i - Disable Images - .TP -+.B \-k -+Enable kiosk mode (disable key stokes and right click) -+.TP - .B \-n - Disable the Web Inspector (Developer Tools). - .TP -diff --git a/surf.c b/surf.c -index 214b9c7..37db29a 100644 ---- a/surf.c -+++ b/surf.c -@@ -644,7 +644,8 @@ newclient(void) { - g_signal_connect(G_OBJECT(c->win), - "destroy", - G_CALLBACK(destroywin), c); -- g_signal_connect(G_OBJECT(c->win), -+ if (!kioskmode) -+ g_signal_connect(G_OBJECT(c->win), - "key-press-event", - G_CALLBACK(keypress), c); - -@@ -748,6 +749,8 @@ newclient(void) { - enablespatialbrowsing, NULL); - g_object_set(G_OBJECT(settings), "enable-developer-extras", - enableinspector, NULL); -+ g_object_set(G_OBJECT(settings), "enable-default-context-menu", -+ kioskmode ^ 1, NULL); - - if(enableinspector) { - c->inspector = WEBKIT_WEB_INSPECTOR( -@@ -790,7 +793,7 @@ newclient(void) { - static void - newwindow(Client *c, const Arg *arg, gboolean noembed) { - guint i = 0; -- const char *cmd[11], *uri; -+ const char *cmd[12], *uri; - const Arg a = { .v = (void *)cmd }; - char tmp[64]; - -@@ -804,6 +807,8 @@ newwindow(Client *c, const Arg *arg, gboolean noembed) { - } - if(!loadimages) - cmd[i++] = "-i"; -+ if(!kioskmode) -+ cmd[i++] = "-k"; - if(!enableplugins) - cmd[i++] = "-p"; - if(!enablescripts) -@@ -1180,7 +1185,7 @@ updatewinid(Client *c) { - - static void - usage(void) { -- die("usage: %s [-binpsvx] [-c cookiefile] [-e xid] [-r scriptfile]" -+ die("usage: %s [-biknpsvx] [-c cookiefile] [-e xid] [-r scriptfile]" - " [-t stylefile] [-u useragent] [uri]\n", basename(argv0)); - } - -@@ -1226,6 +1231,9 @@ main(int argc, char *argv[]) { - case 'i': - loadimages = 0; - break; -+ case 'k': -+ kioskmode = 1; -+ break; - case 'n': - enableinspector = 0; - break;