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.
This commit is contained in:
Arjen Hiemstra 2022-02-22 14:34:57 +01:00 committed by Nate Graham
parent 844c451156
commit 9253c06105

View file

@ -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);