summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2013-08-25 19:50:40 +0200
committerChristoph Lohmann <20h@r-36.net>2013-08-25 19:50:40 +0200
commit237e10058aaceca4660259d3948662a1e0b79cfb (patch)
treea52a6ae3c17dec8ec84b5c1dd07984680904e52a
parent058f7f45e2dd04363bf4f57982f633ddd5b7f16a (diff)
downloadsurf-237e10058aaceca4660259d3948662a1e0b79cfb.tar.gz
surf-237e10058aaceca4660259d3948662a1e0b79cfb.tar.bz2
surf-237e10058aaceca4660259d3948662a1e0b79cfb.zip
Add fullscreen mode as flag and config option.
-rw-r--r--config.def.h1
-rw-r--r--surf.15
-rw-r--r--surf.c8
3 files changed, 13 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index 49ffa49..7927b42 100644
--- a/config.def.h
+++ b/config.def.h
@@ -11,6 +11,7 @@ static char *strictssl = FALSE; /* Refuse untrusted SSL connections */
static Bool kioskmode = FALSE; /* Ignore shortcuts */
static Bool showindicators = TRUE; /* Show indicators in window title */
static Bool zoomto96dpi = TRUE; /* Zoom pages to always emulate 96dpi */
+static Bool runinfullscreen = FALSE; /* Run in fullscreen mode by default */
static guint defaultfontsize = 12;
diff --git a/surf.1 b/surf.1
index 3b38143..619e233 100644
--- a/surf.1
+++ b/surf.1
@@ -3,7 +3,7 @@
surf \- simple webkit-based browser
.SH SYNOPSIS
.B surf
-.RB [-bBgGiIkKnNpPsSvx]
+.RB [-bBfgGiIkKnNpPsSvx]
.RB [-c\ cookiefile]
.RB [-e\ xid]
.RB [-r\ scriptfile]
@@ -32,6 +32,9 @@ to use.
Reparents to window specified by
.I xid.
.TP
+.B \-f
+Run surf in fullscreen mode.
+.TP
.B \-g
Disable giving the geolocation to websites.
.TP
diff --git a/surf.c b/surf.c
index fb5833d..42bc393 100644
--- a/surf.c
+++ b/surf.c
@@ -833,6 +833,11 @@ newclient(void) {
c->isinspecting = false;
}
+ if(runinfullscreen) {
+ c->fullscreen = 0;
+ fullscreen(c, NULL);
+ }
+
g_free(uri);
setatom(c, AtomFind, "");
@@ -1318,6 +1323,9 @@ main(int argc, char *argv[]) {
case 'e':
embed = strtol(EARGF(usage()), NULL, 0);
break;
+ case 'f':
+ runinfullscreen = 1;
+ break;
case 'g':
allowgeolocation = 0;
break;