diff options
author | André de la Rocha <[email protected]> | 2022-05-12 19:20:35 +0200 |
---|---|---|
committer | André de la Rocha <[email protected]> | 2022-05-16 16:37:38 +0200 |
commit | 067b53864112c084587fa9a507eb4bde3d50a6e1 (patch) | |
tree | 3ec8d5ab463f44aa76e5ba03b37aa14242b0b036 | |
parent | 75f22702933bad4f0da2b63a94ea183021771e4c (diff) |
Windows QPA: Fix text input with Input Method Editors
Removes a workaround that was added to force the Windows On-Screen
Keyboard to automatically appear on Windows tablets, since it is
no longer needed in currently supported Windows releases and was
interfering with text input using Input Method Editors.
Also remove logic for programmatically disabling the OSK, since
it is no longer needed here as well, and is already supported in
the UI Automation code elsewhere in the Windows QPA.
Pick-to: 6.2 6.3
Fixes: QTBUG-98003
Change-Id: I6c4781852a5e9f96330d54a24ee3893dcd43a28c
Reviewed-by: Volker Hilsheimer <[email protected]>
-rw-r--r-- | src/plugins/platforms/windows/qwindowsinputcontext.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp index 812926b3c11..758490ffb77 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()); } } |