diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-10-10 16:51:13 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-12-05 07:57:34 +0000 |
commit | ff6bd91f580fa5ddae2d02f32b9d83be4374a445 (patch) | |
tree | c49ea2fe1d52db1aaf65696282004880f223ad98 /src/quick/items/qquickmousearea.cpp | |
parent | 33d93478aa2a53983dd6a02588db2dc0ccbe694d (diff) |
MouseArea: react to touch ungrab
If an event handler (such as DragHandler) takes the exclusive grab
of a touchpoint that MouseArea had already grabbed as a synth-mouse,
it should react in the same way as if its grab of the actual mouse was
stolen: release the pressed state, etc.
Fixes: QTBUG-77624
Change-Id: I51f4fb253f7d0377be421c23e617942507616e72
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 23df1603f514407d245a2740f32f589318ef654e)
Diffstat (limited to 'src/quick/items/qquickmousearea.cpp')
-rw-r--r-- | src/quick/items/qquickmousearea.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp index 0b345697ec..5124802dbf 100644 --- a/src/quick/items/qquickmousearea.cpp +++ b/src/quick/items/qquickmousearea.cpp @@ -938,6 +938,12 @@ void QQuickMouseArea::mouseUngrabEvent() ungrabMouse(); } +void QQuickMouseArea::touchUngrabEvent() +{ + // allow a Pointer Handler to steal the grab from MouseArea + ungrabMouse(); +} + bool QQuickMouseArea::sendMouseEvent(QMouseEvent *event) { Q_D(QQuickMouseArea); |