Skip to content

inputmethod: make forceActive() unconditionally activate the input method

Currently, InputMethod::forceActive() doesn't actually force the input method to be active. Instead, it still respects the existing limitation that input methods can only be shown when accompanied by a touch event. This means that any UI element calling InputMethod::forceActive() isn't guaranteed that the input method will actually appear; if the user uses a pointing device, it won't.

We currently have this problem in the SDDM login theme: there's a "Show virtual keyboard" button that does nothing when clicked. Needless to say, it's a sub-optimal UX.

To fix that issue, this commit makes InputMethod::forceActive() bypass the normal requirement that the last input event was a touch event. Apps that want to respect that limitation should use InputMethod::show() instead.

Without this change, or one that accomplishes the same goal in a different way, we will be unable to fix Bug 467209.

BUG: 467302 FIXED-IN: 6.0

CC @teams/usability @marcdeop @apol

Edited by Nate Graham

Merge request reports