aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-03-31 16:43:03 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2017-04-20 18:38:12 +0000
commit083160b082a9e622c5266803ab8adb19028c31b6 (patch)
treea7efd40ebcc9f8f80a796f148e4760ebc00ca24e /src/quick/items/qquickevents.cpp
parentc2d6f267a74f7fdd9422af88e35ade280cf0a3d3 (diff)
QQuickEventPoint: always inform grabberItem on touch grab cancel
If we have a TouchCancel event we send it to the Item via sendEvent, so it can be detected in the Item's event() or touchEvent() override. If not, it still needs to be informed that it lost the grab, so call touchUngrabEvent() instead. MultiPointTouchArea for example will stop showing that all its points are pressed, if the grab is stolen by something else. Followup to 59c753bc75c7cfd4068fbbba3c25e1f54c46f4c0 Change-Id: I211c02d51cdde8f8722600cf914485adcc2aa1f3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents.cpp')
-rw-r--r--src/quick/items/qquickevents.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index 3b14f72870..00dcdf2fca 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -709,6 +709,8 @@ void QQuickEventPoint::cancelExclusiveGrabImpl(QTouchEvent *cancelEvent)
} else if (auto item = grabberItem()) {
if (cancelEvent)
QCoreApplication::sendEvent(item, cancelEvent);
+ else
+ item->touchUngrabEvent();
}
m_exclusiveGrabber.clear();
}