From 2d6fe2cb05449f3ee90d400a647f03523348565d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 15 Dec 2015 10:08:36 +0100 Subject: [PATCH] [wayland] Forward error channel of launched processes This ensures that the redirection to xwayland-errors works properly for a complete session. --- main_wayland.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main_wayland.cpp b/main_wayland.cpp index ca4262b14b..c52c8c7a6d 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -198,6 +198,7 @@ void ApplicationWayland::continueStartupWithX() environment.remove("DISPLAY"); environment.remove("WAYLAND_DISPLAY"); QProcess *p = new QProcess(this); + p->setProcessChannelMode(QProcess::ForwardedErrorChannel); auto finishedSignal = static_cast(&QProcess::finished); connect(p, finishedSignal, this, [this, p] { @@ -217,6 +218,7 @@ void ApplicationWayland::continueStartupWithX() // start session if (!m_sessionArgument.isEmpty()) { QProcess *p = new QProcess(this); + p->setProcessChannelMode(QProcess::ForwardedErrorChannel); p->setProcessEnvironment(m_environment); auto finishedSignal = static_cast(&QProcess::finished); connect(p, finishedSignal, this, &ApplicationWayland::quit); @@ -228,6 +230,7 @@ void ApplicationWayland::continueStartupWithX() // note: this will kill the started process when we exit // this is going to happen anyway as we are the wayland and X server the app connects to QProcess *p = new QProcess(this); + p->setProcessChannelMode(QProcess::ForwardedErrorChannel); p->setProcessEnvironment(m_environment); p->start(application); } @@ -297,6 +300,7 @@ void ApplicationWayland::startXwaylandServer() m_xcbConnectionFd = sx[0]; m_xwaylandProcess = new QProcess(kwinApp()); + m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel); m_xwaylandProcess->setProgram(QStringLiteral("Xwayland")); QProcessEnvironment env = m_environment; env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd));