From 6e58d50efa758ae2a6d3f349f2eb82351280448a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 13 Jun 2015 21:29:56 +0200 Subject: [PATCH] [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. --- main_wayland.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main_wayland.cpp b/main_wayland.cpp index 66a2af6bd0..18a42baaaa 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -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());