inputmethod: If KWIN_IM_SHOW_ALWAYS variable is set, show the keyboard

To allow for easier testing in development and for debugging purposes, when
the KWIN_IM_SHOW_ALWAYS environment variable is set, treat it as allowing
the keyboard to be shown, even when not using touch input.
This commit is contained in:
Rodney Dawes 2022-07-07 10:43:49 -04:00
parent df1938b8af
commit 6af5a5e651

View file

@ -131,7 +131,8 @@ void InputMethod::hide()
bool InputMethod::shouldShowOnActive() const
{
return input()->touch() == input()->lastInputHandler()
static bool alwaysShowIm = qEnvironmentVariableIntValue("KWIN_IM_SHOW_ALWAYS") != 0;
return alwaysShowIm || input()->touch() == input()->lastInputHandler()
|| input()->tablet() == input()->lastInputHandler();
}