Name Wayland socket automatically when no socket name was specified

Summary:
Wayland provides functionality for servers to acquire an unused socket name
automatically. Do this through the recently added functionality in KWayland
in case no socket name was specified as an argument to KWin.

Test Plan: Manually, autotests pass.

Reviewers: #kwin, fvogt

Reviewed By: fvogt

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18522
This commit is contained in:
Roman Gilg 2019-01-25 13:04:14 +01:00
parent 260fa71d5d
commit 4729a42c34

View file

@ -189,6 +189,8 @@ bool WaylandServer::init(const QByteArray &socketName, InitalizationFlags flags)
m_display = new KWayland::Server::Display(this);
if (!socketName.isNull() && !socketName.isEmpty()) {
m_display->setSocketName(QString::fromUtf8(socketName));
} else {
m_display->setAutomaticSocketNaming(true);
}
m_display->start();
if (!m_display->isRunning()) {