[wiki] [sites] update patch to disable right click in kiosk mode || Christian Hesse

From: <git_AT_suckless.org>
Date: Mon, 11 Mar 2013 21:16:09 +0100

commit 5b365248b9c2af7fb645d27c5d424534e426ddb1
Author: Christian Hesse <mail_AT_eworm.de>
Date: Mon Mar 11 21:15:39 2013 +0100

    update patch to disable right click in kiosk mode

diff --git a/surf.suckless.org/patches/kioskmode.md b/surf.suckless.org/patches/kioskmode.md
index 4e697a1..95129a8 100644
--- a/surf.suckless.org/patches/kioskmode.md
+++ b/surf.suckless.org/patches/kioskmode.md
_AT_@ -10,7 +10,7 @@ strokes within surf. Text input on websites is still possible though.
 Download
 --------
 
-* [surf-kiosk.diff](surf-kiosk.diff) (2k) (20130310)
+* [surf-kiosk.diff](surf-kiosk.diff) (2.3k) (20130311)
 
 Author
 ------
diff --git a/surf.suckless.org/patches/surf-kiosk.diff b/surf.suckless.org/patches/surf-kiosk.diff
index 8c1cd3b..3cdca38 100644
--- a/surf.suckless.org/patches/surf-kiosk.diff
+++ b/surf.suckless.org/patches/surf-kiosk.diff
_AT_@ -11,7 +11,7 @@ index d9a2be9..adfa7a6 100644
  /* Webkit default features */
  static Bool enablescrollbars = TRUE;
 diff --git a/surf.1 b/surf.1
-index 97c00f0..6b8e233 100644
+index 97c00f0..c228fbd 100644
 --- a/surf.1
 +++ b/surf.1
 _AT_@ -32,6 +32,9 @@ Reparents to window specified by
_AT_@ -19,13 +19,13 @@ index 97c00f0..6b8e233 100644
  Disable Images
  .TP
 +.B \-k
-+Enable kiosk mode (disable key stokes)
++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..06d6767 100644
+index 214b9c7..37db29a 100644
 --- a/surf.c
 +++ b/surf.c
 _AT_@ -644,7 +644,8 @@ newclient(void) {
_AT_@ -38,7 +38,16 @@ index 214b9c7..06d6767 100644
                          "key-press-event",
                          G_CALLBACK(keypress), c);
  
-_AT_@ -790,7 +791,7 @@ newclient(void) {
+_AT_@ -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(
+_AT_@ -790,7 +793,7 @@ newclient(void) {
  static void
  newwindow(Client *c, const Arg *arg, gboolean noembed) {
          guint i = 0;
_AT_@ -47,7 +56,7 @@ index 214b9c7..06d6767 100644
          const Arg a = { .v = (void *)cmd };
          char tmp[64];
  
-_AT_@ -804,6 +805,8 @@ newwindow(Client *c, const Arg *arg, gboolean noembed) {
+_AT_@ -804,6 +807,8 @@ newwindow(Client *c, const Arg *arg, gboolean noembed) {
          }
          if(!loadimages)
                  cmd[i++] = "-i";
_AT_@ -56,7 +65,7 @@ index 214b9c7..06d6767 100644
          if(!enableplugins)
                  cmd[i++] = "-p";
          if(!enablescripts)
-_AT_@ -1180,7 +1183,7 @@ updatewinid(Client *c) {
+_AT_@ -1180,7 +1185,7 @@ updatewinid(Client *c) {
  
  static void
  usage(void) {
_AT_@ -65,7 +74,7 @@ index 214b9c7..06d6767 100644
                  " [-t stylefile] [-u useragent] [uri]
", basename(argv0));
  }
  
-_AT_@ -1226,6 +1229,9 @@ main(int argc, char *argv[]) {
+_AT_@ -1226,6 +1231,9 @@ main(int argc, char *argv[]) {
          case 'i':
                  loadimages = 0;
                  break;
Received on Mon Mar 11 2013 - 21:16:09 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 11 2013 - 21:24:06 CET