From 791b0bb296a02f2fcabdbc600d22d72cf0b2c3ee Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Tue, 11 Jan 2022 17:46:43 -0800 Subject: [PATCH] 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. --- src/inputmethod.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index 2a2aa22591..fa166e7752 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -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);