[backends/wayland] Only set socket name if it got sepcified

If we don't have a dedicated device identifier we should use the default
mechanismn which involves using the WAYLAND_DISPLAY or WAYLAND_SOCKET env
variable.
icc-effect-5.14.5
Martin Gräßlin 2015-11-17 09:47:46 +01:00
parent 930e56767e
commit 75c82fce19
1 changed files with 3 additions and 1 deletions

View File

@ -329,7 +329,9 @@ void WaylandBackend::init()
}
);
connect(m_registry, &Registry::interfacesAnnounced, this, &WaylandBackend::createSurface);
m_connectionThreadObject->setSocketName(deviceIdentifier());
if (!deviceIdentifier().isEmpty()) {
m_connectionThreadObject->setSocketName(deviceIdentifier());
}
initConnection();
}