Windows QPA: Fix blinking dot on Windows 7/8/8.1
A blinking white dot could appear on dark backgrounds on Windows 7/8/8.1. It was caused by a workaround added to trigger the on-screen keyboard on the Microsoft Surface. This change effectively restricts that workaround to Windows 10, where the blinking dot was not an issue. And anyway, impact over the Surface functionality should be minimal, as all models produced since 2015 only support Windows 10 (and it's unknown if the workaround was ever necessary for early models running Windows 8.1). Fixes: QTBUG-74492 Change-Id: Ic9b9c0f71f23b75212054c56a29796cf0efa109a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
1a14f7e91b
commit
cc873ec23a
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user