From e5b4e7a9ed5b1d65b2ea6870498d7a1a4dbb3237 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 13 Sep 2018 12:00:30 +0200 Subject: QWinRTInputContext::hideInputPanel: return early if panel is not visible If the input panel is not visible TryHide will result in "Failed to hide input panel. (The operation completed successfully.)". That happens a lot in Qt's auto tests for example. Change-Id: Ieae17e07c3646dce8f348e21f537a2455fe03461 Reviewed-by: Friedemann Kleint Reviewed-by: Miguel Costa Reviewed-by: Andre de la Rocha --- src/plugins/platforms/winrt/qwinrtinputcontext.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/winrt') diff --git a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp index 63e5b0cf27..2eeef202e9 100644 --- a/src/plugins/platforms/winrt/qwinrtinputcontext.cpp +++ b/src/plugins/platforms/winrt/qwinrtinputcontext.cpp @@ -205,6 +205,8 @@ void QWinRTInputContext::showInputPanel() void QWinRTInputContext::hideInputPanel() { qCDebug(lcQpaInputMethods) << __FUNCTION__; + if (!m_isInputPanelVisible) + return; QEventDispatcherWinRT::runOnXamlThread([&]() { ComPtr inputPane; -- cgit v1.2.3