diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-01-12 20:17:15 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-01-14 21:01:52 +0000 |
commit | 5d0c1fc29fe97c7a121cc73e5c41a4ecb0e132ce (patch) | |
tree | e6aefa4e11160034f504293ba89dcf5dd3f5e047 /src/corelib/.prev_configure.cmake | |
parent | ca4f26320dba0452b8b3a2910bb39ba12c109e25 (diff) |
AA_SynthesizeTouchForUnhandledMouseEvents: keep correct coordinates
QGuiApplicationPrivate::processMouseEvent() sends a
QWindowSystemInterfacePrivate::TouchEvent if the mouse event is not
accepted and AA_SynthesizeTouchForUnhandledMouseEvents is enabled.
A QPA TouchEvent always contains native touch points, which is why
it calls QWindowSystemInterfacePrivate::fromNativeTouchPoints to
translate the QMouseEvent's device-independent position back to the
raw position that it would have had if it came from a real touchscreen.
Therefore we must give that function touchpoints that are actually in
native coordinates.
It may be that some of this transformation could be avoided entirely,
but here we prove that the existing way works correctly, by adding
coordinate checking to the tst_QWindow::mouseToTouchTranslation() test.
Task-number: QTBUG-86165
Change-Id: I4c9ca2b11e9eb76d79712c187db3eb9865da581a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit aeeac48cbdea744406f0c8abefe271f571b61d07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/.prev_configure.cmake')
0 files changed, 0 insertions, 0 deletions