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 <Friedemann.Kleint@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
This commit is contained in:
parent
50b995d114
commit
e5b4e7a9ed
@ -205,6 +205,8 @@ void QWinRTInputContext::showInputPanel()
|
|||||||
void QWinRTInputContext::hideInputPanel()
|
void QWinRTInputContext::hideInputPanel()
|
||||||
{
|
{
|
||||||
qCDebug(lcQpaInputMethods) << __FUNCTION__;
|
qCDebug(lcQpaInputMethods) << __FUNCTION__;
|
||||||
|
if (!m_isInputPanelVisible)
|
||||||
|
return;
|
||||||
|
|
||||||
QEventDispatcherWinRT::runOnXamlThread([&]() {
|
QEventDispatcherWinRT::runOnXamlThread([&]() {
|
||||||
ComPtr<IInputPane2> inputPane;
|
ComPtr<IInputPane2> inputPane;
|
||||||
|
Loading…
Reference in New Issue
Block a user