Xnamespace: initial config loader

This loads the configuration (simple text file) passed via command line.
For now just supporting static configuration, that's loaded on server
startup.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-03-19 10:50:56 +01:00
parent 9c4b4e54d1
commit f790bae8dc
4 changed files with 187 additions and 3 deletions

View File

@@ -294,6 +294,9 @@ UseMsg(void)
ErrorF("+iglx Allow creating indirect GLX contexts\n");
ErrorF("-iglx Prohibit creating indirect GLX contexts (default)\n");
ErrorF("-I ignore all remaining arguments\n");
#ifdef CONFIG_NAMESPACE
ErrorF("-namespace <conf> Enable NAMESPACE extension with given config file\n");
#endif /* CONFIG_NAMESPACE */
LockServerUseMsg();
ErrorF("-maxclients n set maximum number of clients (power of two)\n");
ErrorF("-nolisten string don't listen on protocol\n");
@@ -692,6 +695,16 @@ ProcessCommandLine(int argc, char *argv[])
UseMsg();
}
}
#ifdef CONFIG_NAMESPACE
else if (strcmp(argv[i], "-namespace") == 0) {
if (++i < argc) {
namespaceConfigFile = argv[i];
noNamespaceExtension = FALSE;
}
else
UseMsg();
}
#endif
#ifdef XINERAMA
else if (strcmp(argv[i], "+xinerama") == 0) {
noPanoramiXExtension = FALSE;