From dddb43ec515a29fff680943cd444f9f4c1fe0d39 Mon Sep 17 00:00:00 2001 From: Olivier Certner Date: Wed, 10 Feb 2021 19:38:56 +0100 Subject: [PATCH] os: Always create lock file on explicit display I.e., even if "-displayfd" is also specified. This is because, in this case, the server creation process is essentially the same as when "-displayfd" is not specified. The only difference with the latter case should be that Xorg outputs the passed display to the display FD (only the display selection logic is bypassed). Signed-off-by: Olivier Certner --- os/utils.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/os/utils.c b/os/utils.c index 6cefc02ac..b3d300222 100644 --- a/os/utils.c +++ b/os/utils.c @@ -267,7 +267,7 @@ LockServer(void) int len; char port[20]; - if (nolock || NoListenAll) + if (nolock || NoListenAll || (displayfd != -1 && !explicit_display)) return; /* * Path names @@ -388,7 +388,7 @@ LockServer(void) void UnlockServer(void) { - if (nolock || NoListenAll) + if (nolock || NoListenAll || (displayfd != -1 && !explicit_display)) return; if (!StillLocking) { @@ -752,9 +752,6 @@ ProcessCommandLine(int argc, char *argv[]) else if (strcmp(argv[i], "-displayfd") == 0) { if (++i < argc) { displayfd = atoi(argv[i]); -#ifdef LOCK_SERVER - nolock = TRUE; -#endif } else UseMsg();