Only call ShowCaret if Windows 10 1709 or later is used
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: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit be73bdc5d2491d036e5a6334dada453ed808dbc0)
This commit is contained in:
parent
a4a5b4288e
commit
c6d07c5418
@ -280,13 +280,15 @@ void QWindowsInputContext::showInputPanel()
|
|||||||
// with Windows 10 if the Windows IME is (re)enabled _after_ the caret is shown.
|
// with Windows 10 if the Windows IME is (re)enabled _after_ the caret is shown.
|
||||||
if (m_caretCreated) {
|
if (m_caretCreated) {
|
||||||
cursorRectChanged();
|
cursorRectChanged();
|
||||||
// We only call ShowCaret() on Windows 10 as in earlier versions the caret
|
// We only call ShowCaret() on Windows 10 after 1703 as in earlier versions
|
||||||
// would actually be visible (QTBUG-74492) and the workaround for the
|
// the caret would actually be visible (QTBUG-74492) and the workaround for
|
||||||
// Surface seems unnecessary there anyway. But leave it hidden for IME.
|
// the Surface seems unnecessary there anyway. But leave it hidden for IME.
|
||||||
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows10)
|
if (QOperatingSystemVersion::current() >=
|
||||||
|
QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 16299)) {
|
||||||
ShowCaret(platformWindow->handle());
|
ShowCaret(platformWindow->handle());
|
||||||
else
|
} else {
|
||||||
HideCaret(platformWindow->handle());
|
HideCaret(platformWindow->handle());
|
||||||
|
}
|
||||||
setWindowsImeEnabled(platformWindow, false);
|
setWindowsImeEnabled(platformWindow, false);
|
||||||
setWindowsImeEnabled(platformWindow, true);
|
setWindowsImeEnabled(platformWindow, true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user