diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index e68fd8bf68..f40f29e396 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -111,12 +111,24 @@ void InputMethod::init() void InputMethod::show() { + if (m_inputClient) { + m_inputClient->showClient(); + updateInputPanelState(); + } setActive(true); } void InputMethod::hide() { - setActive(false); + if (m_inputClient) { + m_inputClient->hideClient(); + updateInputPanelState(); + } + auto inputContext = waylandServer()->inputMethod()->context(); + if (!inputContext) { + return; + } + inputContext->sendReset(); } bool InputMethod::touchEventTriggered() const diff --git a/src/inputpanelv1client.cpp b/src/inputpanelv1client.cpp index 3336065410..9fddb181d0 100644 --- a/src/inputpanelv1client.cpp +++ b/src/inputpanelv1client.cpp @@ -49,6 +49,7 @@ void InputPanelV1Client::showOverlayPanel() setOutput(nullptr); m_mode = Overlay; reposition(); + showClient(); setReadyForPainting(); } @@ -57,6 +58,7 @@ void InputPanelV1Client::showTopLevel(OutputInterface *output, InputPanelSurface Q_UNUSED(position); m_mode = Toplevel; setOutput(output); + showClient(); } void InputPanelV1Client::allow()