inputmethod: Reconsider what a hidden input method is

When the panel disappears, just reconsider the panel's state but don't
just stop sending updates to the input method.
Some input methods are just helpers that show and hide as necessary.
This commit is contained in:
Aleix Pol 2021-06-07 02:44:36 +02:00 committed by Aleix Pol Gonzalez
parent 66661a9ddc
commit 6fa96852dc

View file

@ -151,12 +151,9 @@ void InputMethod::clientAdded(AbstractClient *_client)
}
});
connect(m_inputClient, &AbstractClient::frameGeometryChanged, this, &InputMethod::updateInputPanelState);
// Current code have a assumption that InputMethod started by the kwin is virtual keyboard,
// InputMethod::hide sends out a deactivate signal to input-method client, this is not desired
// when we support input methods like ibus which can show and hide surfaces/windows as they please
// and are not exactly Virtual keyboards.
connect(m_inputClient, &AbstractClient::windowHidden, this, &InputMethod::hide);
connect(m_inputClient, &AbstractClient::windowClosed, this, &InputMethod::hide);
connect(m_inputClient, &AbstractClient::windowHidden, this, &InputMethod::updateInputPanelState);
connect(m_inputClient, &AbstractClient::windowClosed, this, &InputMethod::updateInputPanelState);
updateInputPanelState();
}
void InputMethod::setTrackedClient(AbstractClient* trackedClient)