[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.
This commit is contained in:
Martin Gräßlin 2015-11-17 09:47:46 +01:00
parent 930e56767e
commit 75c82fce19

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();
}