diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp index 812926b3c1..758490ffb7 100644 --- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp @@ -237,23 +237,9 @@ void QWindowsInputContext::showInputPanel() if (!m_caretCreated && m_transparentBitmap) m_caretCreated = CreateCaret(platformWindow->handle(), m_transparentBitmap, 0, 0); - // For some reason, the on-screen keyboard is only triggered on the Surface - // with Windows 10 if the Windows IME is (re)enabled _after_ the caret is shown. if (m_caretCreated) { cursorRectChanged(); - // We only call ShowCaret() on Windows 10 after 1703 as in earlier versions - // the caret would actually be visible (QTBUG-74492) and the workaround for - // the Surface seems unnecessary there anyway. But leave it hidden for IME. - // Only trigger the native OSK if the Qt OSK is not in use. - static bool imModuleEmpty = qEnvironmentVariableIsEmpty("QT_IM_MODULE"); - bool nativeVKDisabled = QCoreApplication::testAttribute(Qt::AA_DisableNativeVirtualKeyboard); - if (imModuleEmpty && !nativeVKDisabled) { - ShowCaret(platformWindow->handle()); - } else { - HideCaret(platformWindow->handle()); - } - setWindowsImeEnabled(platformWindow, false); - setWindowsImeEnabled(platformWindow, true); + ShowCaret(platformWindow->handle()); } }