Do not remove WAYLAND_DISPLAY environment variable for input method.

Based on the implementation of wl_display_connect, WAYLAND_SOCKET is
always preferred over WAYLAND_DISPLAY, which means it is OK to have both
of them set. This allows subprocess of input method to have the correct
WAYLAND_DISPLAY variable set.
This commit is contained in:
Weng Xuetian 2022-01-11 17:46:43 -08:00 committed by Xuetian Weng
parent de7b429528
commit 791b0bb296

View file

@ -688,7 +688,6 @@ void InputMethod::startInputMethod()
QProcessEnvironment environment = kwinApp()->processStartupEnvironment(); QProcessEnvironment environment = kwinApp()->processStartupEnvironment();
environment.insert(QStringLiteral("WAYLAND_SOCKET"), QByteArray::number(socket)); environment.insert(QStringLiteral("WAYLAND_SOCKET"), QByteArray::number(socket));
environment.insert(QStringLiteral("QT_QPA_PLATFORM"), QStringLiteral("wayland")); environment.insert(QStringLiteral("QT_QPA_PLATFORM"), QStringLiteral("wayland"));
environment.remove("WAYLAND_DISPLAY");
m_inputMethodProcess = new QProcess(this); m_inputMethodProcess = new QProcess(this);
m_inputMethodProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel); m_inputMethodProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);