Android: Fix touchDown event coordinates
In the touchAdd method, the mapped touch point is divided by the platform integration screen size. In order not to mix different coordinate systems, we should use platformWindow to correctly calculate global position of touch event. Pick-to: 6.9 6.8 Task-number: QTBUG-130576 Task-number: QTBUG-127925 Change-Id: Ic7653a60fb3def181f29a3e28b963878dc54a99e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
c04b95cb59
commit
01d25533b4
@ -289,7 +289,12 @@ namespace QtAndroidInput
|
||||
return;
|
||||
}
|
||||
|
||||
QPointF mappedTouchPoint = window->mapToGlobal(QPointF(x, y));
|
||||
QPointF mappedTouchPoint;
|
||||
if (window->handle())
|
||||
mappedTouchPoint = window->handle()->mapToGlobalF(QPointF(x, y));
|
||||
else
|
||||
mappedTouchPoint = window->mapToGlobal(QPointF(x, y));
|
||||
|
||||
QWindowSystemInterface::TouchPoint touchPoint;
|
||||
// Start numbering touch points from 1
|
||||
touchPoint.id = id + 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user