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 <olce.freedesktop@certner.fr>
This commit is contained in:
Olivier Certner 2021-02-10 19:38:56 +01:00
parent a4095162ca
commit dddb43ec51

View file

@ -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();