summaryrefslogtreecommitdiff
path: root/os/utils.c
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-03-11 14:34:32 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-03-27 14:34:34 +0000
commitbc348bd2c42f3f18786085ccef2f010eff5bf3d2 (patch)
tree76e763e6bb3f6a05dd07be123f5d8a6c2cf44e50 /os/utils.c
parenta3730271d52542757ec0f41acc29e7730501f666 (diff)
Handle -displayfd and an explicit display number sensibly
Handle -displayfd and an explicit display number sensibly, e.g. use the explicitly specified display number, and write it to the displayfd v2: displayfd might be 0, so use -1 as invalid value v3: Rebase for addition of NoListenAll flag Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Diffstat (limited to 'os/utils.c')
-rw-r--r--os/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/utils.c b/os/utils.c
index c513968ad..6e6974e89 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -666,6 +666,7 @@ ProcessCommandLine(int argc, char *argv[])
else if (argv[i][0] == ':') {
/* initialize display */
display = argv[i];
+ explicit_display = TRUE;
display++;
if (!VerifyDisplayName(display)) {
ErrorF("Bad display name: %s\n", display);
@@ -736,7 +737,6 @@ ProcessCommandLine(int argc, char *argv[])
else if (strcmp(argv[i], "-displayfd") == 0) {
if (++i < argc) {
displayfd = atoi(argv[i]);
- display = NULL;
#ifdef LOCK_SERVER
nolock = TRUE;
#endif