summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-10-18 12:28:13 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2019-10-25 07:00:07 +0000
commitde8538966f51cb1589bfc4032be99b266707e26c (patch)
treef9ab01f3f67074951ddb98632e93869d135f301d
parentabfb1b8665923ce2824392f3a04e5e4ac3871017 (diff)
Only call ShowCaret if Windows 10 1709 or later is used5.12.5
This amends cc873ec23a98ac32d10ac5fa569792fde2f6b2c8 which worked around a problem that was showing up on earlier versions of Windows. This extends the workaround up to Windows 10 1703 as the problem was still occurring up to that version. Fixes: QTBUG-79143 Change-Id: Ib7eace17fb8e3817c556e2bcd462e37834b1cbcf Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
index 61f971143d..08a2ef90b4 100644
--- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
@@ -280,13 +280,15 @@ void QWindowsInputContext::showInputPanel()
// 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 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.
- if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows10)
+ // 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.
+ if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows10 &&
+ QOperatingSystemVersion::current().microVersion() >= 16299) {
ShowCaret(platformWindow->handle());
- else
+ } else {
HideCaret(platformWindow->handle());
+ }
setWindowsImeEnabled(platformWindow, false);
setWindowsImeEnabled(platformWindow, true);
}