simple-xinit: Introduce an escaped "--" argument.

For testing xephyr-glamor on top of Xvfb in CI better, I want to be
able to make one command line describing the nested server invocation,
but that means I need to get two simple-xinits to split client/server
on different "--" arguments.

Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Eric Anholt 2019-03-26 10:59:27 -07:00
parent 29aed56ec7
commit 164a37eac2
2 changed files with 8 additions and 2 deletions

View File

@ -38,7 +38,7 @@ if build_xv
xephyr_dep += dependency('xcb-xv')
endif
executable(
xephyr_server = executable(
'Xephyr',
srcs,
include_directories: [

View File

@ -210,7 +210,13 @@ parse_args(int argc, char **argv,
continue;
}
*next_arg = argv[i];
/* A sort of escaped "--" argument so we can nest server
* invocations for testing.
*/
if (strcmp(argv[i], "----") == 0)
*next_arg = (char *)"--";
else
*next_arg = argv[i];
next_arg++;
}