From 9253c0610523756cf5f75d3256a43e6a2c83eff7 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 22 Feb 2022 14:34:57 +0100 Subject: [PATCH] Disable animations for Maliit when launching it as input method Maliit does client side animation by default but can be told to disable them using an environment variable. Since we now want to do this animation in KWin, always disable the client side animations in Maliit. It feels slightly weird to unconditionally add a Maliit-specific variable, but at the same time all other solutions are more error prone and would likely need more code. --- src/inputmethod.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index 8ac83f92bc..344f86646c 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -689,6 +689,10 @@ void InputMethod::startInputMethod() QProcessEnvironment environment = kwinApp()->processStartupEnvironment(); environment.insert(QStringLiteral("WAYLAND_SOCKET"), QByteArray::number(socket)); environment.insert(QStringLiteral("QT_QPA_PLATFORM"), QStringLiteral("wayland")); + // When we use Maliit as virtual keyboard, we want KWin to handle the animation + // since that works a lot better. So we need to tell Maliit to not do client side + // animation. + environment.insert(QStringLiteral("MALIIT_ENABLE_ANIMATIONS"), "0"); m_inputMethodProcess = new QProcess(this); m_inputMethodProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);