aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-07-14 09:59:23 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-07-14 11:44:21 +0000
commite841c0a252099778fcaa01593592a6b92844e04d (patch)
tree5b7621f898c2ca8633f800bb7efa4384a4c0ae1e /src
parent7a09033636846253f07737431162858ba968cb31 (diff)
QQuickDrawer: fix multi-touch leaking through modal overlay
The first touch point was blocked as appropriate, but the consequent touch points were leaking through to other popups below Drawers' modal overlay. Task-number: QTBUG-61581 Change-Id: I1c3e28e3d25b7489c4a9b684107fd1b5158e1674 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickdrawer.cpp4
-rw-r--r--src/quicktemplates2/qquickpopup.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp
index 20279b03..45c9a3fe 100644
--- a/src/quicktemplates2/qquickdrawer.cpp
+++ b/src/quicktemplates2/qquickdrawer.cpp
@@ -347,10 +347,10 @@ bool QQuickDrawerPrivate::grabMouse(QQuickItem *item, QMouseEvent *event)
bool QQuickDrawerPrivate::grabTouch(QQuickItem *item, QTouchEvent *event)
{
Q_Q(QQuickDrawer);
- handleTouchEvent(item, event);
+ bool handled = handleTouchEvent(item, event);
if (!window || !interactive || popupItem->keepTouchGrab() || !event->touchPointStates().testFlag(Qt::TouchPointMoved))
- return false;
+ return handled;
bool overThreshold = false;
for (const QTouchEvent::TouchPoint &point : event->touchPoints()) {
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 33b2ac1a..c457b347 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -383,8 +383,8 @@ bool QQuickPopupPrivate::handleTouchEvent(QQuickItem *item, QTouchEvent *event)
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
for (const QTouchEvent::TouchPoint &point : event->touchPoints()) {
- if (!acceptTouch(point) && !blockInput(item, point.pos()))
- continue;
+ if (!acceptTouch(point))
+ return blockInput(item, point.pos());
switch (point.state()) {
case Qt::TouchPointPressed: