diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-09-08 17:08:19 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-05-03 15:25:11 +0200 |
commit | 664f986571696414fe2446f80c1b45edf9961999 (patch) | |
tree | 118761851d728b46567805308f79e026d14854bc /src/quick/items/qquickmultipointtoucharea_p.h | |
parent | ab26f6a8a6d4daa28a303091ea77562e38b9bd6d (diff) |
MultiPointTouchArea: remap touchpoint positions when filtering
When MPTA filters a touch event during delivery to a child item,
QEventPoint::position() is relative to the child; but MPTA updates its
stored QQuickTouchPoint instances from the event's touchpoints and emits
pressed(). Now it will first remap them into its own coordinates.
Pick-to: 6.2 6.3 5.15
Fixes: QTBUG-74028
Change-Id: Ia4e64aa829d9d4d452a03bc964f06c729baa8f78
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quick/items/qquickmultipointtoucharea_p.h')
-rw-r--r-- | src/quick/items/qquickmultipointtoucharea_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquickmultipointtoucharea_p.h b/src/quick/items/qquickmultipointtoucharea_p.h index ec201f318e..56ec22645f 100644 --- a/src/quick/items/qquickmultipointtoucharea_p.h +++ b/src/quick/items/qquickmultipointtoucharea_p.h @@ -281,7 +281,8 @@ protected: void updateTouchPoint(QQuickTouchPoint*, const QEventPoint*); void updateTouchPoint(QQuickTouchPoint *dtp, const QMouseEvent *e); - void updateTouchData(QEvent*); + enum class RemapEventPoints { No, ToLocal }; + void updateTouchData(QEvent*, RemapEventPoints remap = RemapEventPoints::No); bool sendMouseEvent(QMouseEvent *event); bool shouldFilter(QEvent *event); |