aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-02 13:41:21 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-05-02 13:02:33 +0000
commitfe86b0fda7bcce099a0bca08e6925e89efc634c4 (patch)
tree6380346b35ebac1993b95c754a2ac8cf1463e7f2 /src
parente95b5368ce769002f495b8e8cea8f223c208e3a0 (diff)
Fix QQuickPopupPrivate::handleMouseEvent()
Touch moves are being abruptly stolen while flicking within a drawer. Looks like there's a difference between mapping mouse events to scene vs. using the window coordinates. All other places in the overlay and popups are using window coordinates, so sync with that to ensure that "drag over threshold" calculations are done based on press and move coordinates that are in the same coordinate space. Task-number: QTBUG-60521 Change-Id: Ied94870fe68a7e5da65b75d3daa585db6e5e9560 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickpopup.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 024890ab..aee013e3 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -360,14 +360,13 @@ void QQuickPopupPrivate::handleUngrab()
bool QQuickPopupPrivate::handleMouseEvent(QQuickItem *item, QMouseEvent *event)
{
- QPointF pos = item->mapToScene(event->localPos());
switch (event->type()) {
case QEvent::MouseButtonPress:
- return handlePress(item, pos, event->timestamp());
+ return handlePress(item, event->windowPos(), event->timestamp());
case QEvent::MouseMove:
- return handleMove(item, pos, event->timestamp());
+ return handleMove(item, event->windowPos(), event->timestamp());
case QEvent::MouseButtonRelease:
- return handleRelease(item, pos, event->timestamp());
+ return handleRelease(item, event->windowPos(), event->timestamp());
default:
Q_UNREACHABLE();
return false;