[hackers] [surf] Fix fullscreen handling

From: Quentin Rameau <quinq+hackers_AT_fifth.space>
Date: Tue, 3 Nov 2015 14:25:44 +0100

Handle the fullscreen in a more consistent way with other options:
-f disables fullscreen while -F enables fullscreen.
---
 surf.1 | 4 ++--
 surf.c | 8 +++-----
 2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/surf.1 b/surf.1
index dc033c6..3457a55 100644
--- a/surf.1
+++ b/surf.1
_AT_@ -51,10 +51,10 @@ Reparents to window specified by
 .I xid.
 .TP
 .B \-f
-Run surf in fullscreen mode.
+Start surf in windowed mode (not fullscreen).
 .TP
 .B \-F
-Disable to run in fullscreen by default.
+Start surf in fullscreen mode.
 .TP
 .B \-g
 Disable giving the geolocation to websites.
diff --git a/surf.c b/surf.c
index 3f33e54..035853a 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -1053,10 +1053,8 @@ newclient(void)
 		c->isinspecting = false;
 	}
 
-	if (runinfullscreen) {
-		c->fullscreen = 0;
+	if (runinfullscreen)
 		fullscreen(c, NULL);
-	}
 
 	setatom(c, AtomFind, "");
 	setatom(c, AtomUri, "about:blank");
_AT_@ -1685,10 +1683,10 @@ main(int argc, char *argv[])
 		embed = strtol(EARGF(usage()), NULL, 0);
 		break;
 	case 'f':
-		runinfullscreen = 1;
+		runinfullscreen = 0;
 		break;
 	case 'F':
-		runinfullscreen = 0;
+		runinfullscreen = 1;
 		break;
 	case 'g':
 		allowgeolocation = 0;
-- 
2.6.2
Received on Tue Nov 03 2015 - 14:25:44 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 03 2015 - 14:36:11 CET