[wayland] Drop EGL_PLATFORM env variable from QProcessEnvironment passed to launched processes

Can result in interesting crashes of the launched processes, if KWin uses
e.g EGL_PLATFORM=hwcomposer.
icc-effect-5.14.5
Martin Gräßlin 2015-06-13 21:29:56 +02:00
parent d457a8d92b
commit 6e58d50efa
1 changed files with 2 additions and 0 deletions

View File

@ -182,6 +182,7 @@ void ApplicationWayland::continueStartupWithX()
environment.insert(QStringLiteral("QT_QPA_PLATFORM"), QStringLiteral("wayland"));
environment.remove("DISPLAY");
environment.remove("WAYLAND_DISPLAY");
environment.remove(QStringLiteral("EGL_PLATFORM"));
QProcess *p = new QProcess(this);
p->setProcessEnvironment(environment);
p->start(m_inputMethodServerToStart);
@ -195,6 +196,7 @@ void ApplicationWayland::continueStartupWithX()
environment.remove(QStringLiteral("WAYLAND_SOCKET"));
environment.remove(QStringLiteral("QT_QPA_PLATFORM"));
environment.remove(QStringLiteral("QT_WAYLAND_DISABLE_WINDOWDECORATION"));
environment.remove(QStringLiteral("EGL_PLATFORM"));
environment.insert(QStringLiteral("DISPLAY"), QString::fromUtf8(qgetenv("DISPLAY")));
// TODO: maybe create a socket per process?
environment.insert(QStringLiteral("WAYLAND_DISPLAY"), waylandServer()->display()->socketName());