From 6fa96852dc3fd24e5a6f257c493088a2a6a90bd3 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 7 Jun 2021 02:44:36 +0200 Subject: [PATCH] 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. --- src/inputmethod.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index 9789416aca..e2c3494f13 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -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)