slackbuilds_ponce/network/surf/patches/startfullscreen.diff
B. Watson 5339c6bc31 network/surf: Added (minimalist web browser)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
2013-07-07 09:10:01 -03:00

70 lines
1.7 KiB
Diff

diff -Naur surf-0.6/surf.1 surf-0.6.patched/surf.1
--- surf-0.6/surf.1 2013-02-10 13:40:14.000000000 -0500
+++ surf-0.6.patched/surf.1 2013-07-03 18:41:35.000000000 -0400
@@ -50,6 +50,8 @@
.B \-x
Prints xid to standard output. This can be used to script the browser by using
.BR xprop(1).
+.B \-f
+Start in fullscreen mode.
.SH USAGE
.B Escape
Stops loading current page or stops download.
diff -Naur surf-0.6/surf.c surf-0.6.patched/surf.c
--- surf-0.6/surf.c 2013-02-10 13:40:14.000000000 -0500
+++ surf-0.6.patched/surf.c 2013-07-03 18:42:07.000000000 -0400
@@ -81,6 +81,7 @@
static Client *clients = NULL;
static GdkNativeWindow embed = 0;
static gboolean showxid = FALSE;
+static gboolean startfullscreen = FALSE;
static char winid[64];
static gboolean usingproxy = 0;
static char togglestat[5];
@@ -463,7 +464,7 @@
} else {
gtk_window_fullscreen(GTK_WINDOW(c->win));
}
- c->fullscreen = !c->fullscreen;
+ startfullscreen = c->fullscreen = !c->fullscreen;
}
static const char *
@@ -822,6 +823,9 @@
}
}
+ if(startfullscreen) {
+ fullscreen(c, NULL);
+ }
return c;
}
@@ -846,6 +850,8 @@
cmd[i++] = "-i";
if(showxid)
cmd[i++] = "-x";
+ if(startfullscreen)
+ cmd[i++] = "-f";
cmd[i++] = "--";
uri = arg->v ? (char *)arg->v : c->linkhover;
if(uri)
@@ -1148,7 +1154,7 @@
static void
usage(void) {
- die("usage: %s [-inpsvx] [-c cookiefile] [-e xid] [-r scriptfile]"
+ die("usage: %s [-inpsvxf] [-c cookiefile] [-e xid] [-r scriptfile]"
" [-t stylefile] [-u useragent] [uri]\n", basename(argv0));
}
@@ -1215,6 +1221,9 @@
case 'x':
showxid = TRUE;
break;
+ case 'f':
+ startfullscreen = TRUE;
+ break;
default:
usage();
} ARGEND;