summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsinputcontext.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-17 01:00:27 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-07-17 10:44:21 +0200
commit64df0eda36fea91b71783b23bfdf733b6983c250 (patch)
tree92cbd069b534a873a33a46c7735592eaca78d9cd /src/plugins/platforms/windows/qwindowsinputcontext.cpp
parent8b34296e6a86ce5ad9dba6ac54c84a64cec09b96 (diff)
parenta837ec15fec100567730a7bedb06655ef891ac96 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/corelib/global/qlogging.cpp src/gui/painting/qtextureglyphcache_p.h src/gui/text/qfontengine.cpp src/widgets/widgets/qlineedit.cpp Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsinputcontext.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsinputcontext.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.cpp b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
index e681dbb0cb..d5258ca6a3 100644
--- a/src/plugins/platforms/windows/qwindowsinputcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsinputcontext.cpp
@@ -47,6 +47,7 @@
#include <QtCore/qobject.h>
#include <QtCore/qrect.h>
#include <QtCore/qtextboundaryfinder.h>
+#include <QtCore/qoperatingsystemversion.h>
#include <QtGui/qevent.h>
#include <QtGui/qtextformat.h>
@@ -279,7 +280,13 @@ void QWindowsInputContext::showInputPanel()
// with Windows 10 if the Windows IME is (re)enabled _after_ the caret is shown.
if (m_caretCreated) {
cursorRectChanged();
- ShowCaret(platformWindow->handle());
+ // 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)
+ ShowCaret(platformWindow->handle());
+ else
+ HideCaret(platformWindow->handle());
setWindowsImeEnabled(platformWindow, false);
setWindowsImeEnabled(platformWindow, true);
}