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.
master
Weng Xuetian 3 years ago committed by Xuetian Weng
parent de7b429528
commit 791b0bb296

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

Loading…
Cancel
Save