xwayland: Allow for regular transport types for listen

Xwayland uses the command line option “-listen” to pass file descriptors
from the Wayland compositor.

That breaks the traditional, documented behavior of the “-listen”
command line option which is to enable a transport type.

Checks if the given option starts with a digit, otherwise treat it as a
regular transport type.

Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/817
Suggested-by: Rodrigo Exterckötter Tjäder
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
Olivier Fourdan 2019-06-18 10:41:02 +02:00 committed by Adam Jackson
parent 0dc0cef495
commit 4a287cc2b6
1 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,10 @@ ddxProcessArgument(int argc, char *argv[], int i)
else if (strcmp(argv[i], "-listen") == 0) {
CHECK_FOR_REQUIRED_ARGUMENTS(1);
/* Not an FD */
if (!isdigit(*argv[i + 1]))
return 0;
NoListenAll = TRUE;
if (listen_fd_count == ARRAY_SIZE(listen_fds))
FatalError("Too many -listen arguments given, max is %zu\n",