textinputv3: activate the input method when textinput says it's enabled

This commit is contained in:
Aleix Pol 2021-05-10 18:03:14 +02:00
parent 341ec55c9e
commit 64178a0536

View file

@ -317,10 +317,19 @@ void InputMethod::textInputInterfaceV3EnabledChanged()
void InputMethod::stateCommitted(uint32_t serial)
{
auto inputContext = waylandServer()->inputMethod()->context();
if (!inputContext) {
if (!isEnabled()) {
return;
}
TextInputV3Interface *textInputV3 = waylandServer()->seat()->textInputV3();
if (!textInputV3) {
return;
}
if (!isActive() && textInputV3->isEnabled()) {
show();
}
auto inputContext = waylandServer()->inputMethod()->context();
inputContext->sendCommitState(serial);
}