Fix fullscreen handling

Handle the fullscreen in a more consistent way with other options:
-f disables fullscreen while -F enables fullscreen.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
This commit is contained in:
Quentin Rameau 2015-11-03 14:25:44 +01:00 committed by Christoph Lohmann
parent 0290066b31
commit 9a2547230a
2 changed files with 5 additions and 7 deletions

4
surf.1
View File

@ -51,10 +51,10 @@ Reparents to window specified by
.I xid. .I xid.
.TP .TP
.B \-f .B \-f
Run surf in fullscreen mode. Start surf in windowed mode (not fullscreen).
.TP .TP
.B \-F .B \-F
Disable to run in fullscreen by default. Start surf in fullscreen mode.
.TP .TP
.B \-g .B \-g
Disable giving the geolocation to websites. Disable giving the geolocation to websites.

8
surf.c
View File

@ -1053,10 +1053,8 @@ newclient(void)
c->isinspecting = false; c->isinspecting = false;
} }
if (runinfullscreen) { if (runinfullscreen)
c->fullscreen = 0;
fullscreen(c, NULL); fullscreen(c, NULL);
}
setatom(c, AtomFind, ""); setatom(c, AtomFind, "");
setatom(c, AtomUri, "about:blank"); setatom(c, AtomUri, "about:blank");
@ -1685,10 +1683,10 @@ main(int argc, char *argv[])
embed = strtol(EARGF(usage()), NULL, 0); embed = strtol(EARGF(usage()), NULL, 0);
break; break;
case 'f': case 'f':
runinfullscreen = 1; runinfullscreen = 0;
break; break;
case 'F': case 'F':
runinfullscreen = 0; runinfullscreen = 1;
break; break;
case 'g': case 'g':
allowgeolocation = 0; allowgeolocation = 0;