[kwin_wayland] Do not require --display argument for starting X server
If display is not set, it won't be passed to the X command to start and X will just pick the next free display id.
This commit is contained in:
parent
6f0ff3ff7e
commit
819c12819b
1 changed files with 6 additions and 2 deletions
|
@ -128,7 +128,11 @@ static void startXServer(const QByteArray &process, const QByteArray &display)
|
||||||
close(pipeFds[0]);
|
close(pipeFds[0]);
|
||||||
char fdbuf[16];
|
char fdbuf[16];
|
||||||
sprintf(fdbuf, "%d", pipeFds[1]);
|
sprintf(fdbuf, "%d", pipeFds[1]);
|
||||||
execlp(process.constData(), process.constData(), "-displayfd", fdbuf, display.constData(), (char *)0);
|
if (display.isEmpty()) {
|
||||||
|
execlp(process.constData(), process.constData(), "-displayfd", fdbuf, (char *)0);
|
||||||
|
} else {
|
||||||
|
execlp(process.constData(), process.constData(), "-displayfd", fdbuf, display.constData(), (char *)0);
|
||||||
|
}
|
||||||
close(pipeFds[1]);
|
close(pipeFds[1]);
|
||||||
exit(20);
|
exit(20);
|
||||||
}
|
}
|
||||||
|
@ -231,7 +235,7 @@ KWIN_EXPORT int kdemain(int argc, char * argv[])
|
||||||
i18n("Start a nested X Server."),
|
i18n("Start a nested X Server."),
|
||||||
QStringLiteral("xephyr|xvfb|xwayland"));
|
QStringLiteral("xephyr|xvfb|xwayland"));
|
||||||
QCommandLineOption x11DisplayOption(QStringLiteral("display"),
|
QCommandLineOption x11DisplayOption(QStringLiteral("display"),
|
||||||
i18n("The X11 Display to connect to, required if option x-server is used."),
|
i18n("The X11 Display to connect to. If not set next free number will be picked."),
|
||||||
QStringLiteral("display"));
|
QStringLiteral("display"));
|
||||||
|
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
|
|
Loading…
Reference in a new issue