Pass EGL_PLATFORM=DRM to XWayland

XWayland needs to create an eglDisplay for platform DRM. Depending on
the mesa version eglInitialize expects that the passed native display
is a Wayland display and crashes. This prevents KWin to startup.

This patch sets EGL_PLATFORM for Xwayland. This is actually not KWin's
job, but if it otherwise crashes it's better than nothing.

As Xwayland only supports DRM, it's fine to use this.
This commit is contained in:
Martin Gräßlin 2016-12-23 16:18:15 +01:00
parent 286ad7104d
commit 58fa92e40b

View file

@ -324,6 +324,7 @@ void ApplicationWayland::startXwaylandServer()
m_xwaylandProcess->setProgram(QStringLiteral("Xwayland"));
QProcessEnvironment env = m_environment;
env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd));
env.insert("EGL_PLATFORM", QByteArrayLiteral("DRM"));
m_xwaylandProcess->setProcessEnvironment(env);
m_xwaylandProcess->setArguments({QStringLiteral("-displayfd"),
QString::number(pipeFds[1]),