qtdeclarative: Fix flickable event handling
* With isis2 touch mocking there is a situation where flickable doesn't process mouse events even if it has mouse grabbed. * Patch is cherry-picked from upstream. Signed-off-by: Heikki Paajanen <heikki.paajanen@palm.com> Signed-off-by: Martin Jansa <martin.jansa@lge.com>
This commit is contained in:
parent
bbaf26aec2
commit
92881cd8a4
|
@ -0,0 +1,39 @@
|
||||||
|
From 27be7a832f017653ffda705407bb7a64246eda1f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel d'Andrada <daniel.dandrada@canonical.com>
|
||||||
|
Date: Tue, 18 Dec 2012 10:51:21 -0200
|
||||||
|
Subject: [PATCH] Flickable: Fix bug when flicking twice using touches
|
||||||
|
|
||||||
|
When you flick twice in rapid succession, in the same direction,
|
||||||
|
the expected behavior is for flickable to be moving quite fast in the
|
||||||
|
direction of the flicks.
|
||||||
|
|
||||||
|
But when you flicked using touch events instead of mouse ones,
|
||||||
|
the second flick caused Flickable to immediately halt. This change fixes it.
|
||||||
|
|
||||||
|
Upstream-Status: Backport
|
||||||
|
|
||||||
|
Change-Id: I02bd02fed30bd4a98959194e04f0a26b4420cd05
|
||||||
|
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
|
||||||
|
---
|
||||||
|
src/quick/items/qquickflickable.cpp | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
|
||||||
|
index 6e5e6b7..88ef20f 100644
|
||||||
|
--- a/src/quick/items/qquickflickable.cpp
|
||||||
|
+++ b/src/quick/items/qquickflickable.cpp
|
||||||
|
@@ -2038,6 +2038,11 @@ bool QQuickFlickable::sendMouseEvent(QQuickItem *item, QMouseEvent *event)
|
||||||
|
|
||||||
|
QQuickWindow *c = window();
|
||||||
|
QQuickItem *grabber = c ? c->mouseGrabberItem() : 0;
|
||||||
|
+ if (grabber == this && d->stealMouse) {
|
||||||
|
+ // we are already the grabber and we do want the mouse event to ourselves.
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
bool grabberDisabled = grabber && !grabber->isEnabled();
|
||||||
|
bool stealThisEvent = d->stealMouse;
|
||||||
|
if ((stealThisEvent || contains(localPos)) && (!grabber || !grabber->keepMouseGrab() || grabberDisabled)) {
|
||||||
|
--
|
||||||
|
1.7.9.5
|
||||||
|
|
|
@ -7,7 +7,11 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffe
|
||||||
file://${COMMON_LICENSE_DIR}/GFDL-1.3;md5=1083add59b39991c748ea70a92166959 \
|
file://${COMMON_LICENSE_DIR}/GFDL-1.3;md5=1083add59b39991c748ea70a92166959 \
|
||||||
"
|
"
|
||||||
|
|
||||||
PR = "${INC_PR}.0"
|
PR = "${INC_PR}.1"
|
||||||
|
|
||||||
|
SRC_URI += " \
|
||||||
|
file://0001-Flickable-Fix-bug-when-flicking-twice-using-touches.patch \
|
||||||
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "5373ebb2f78e27e14d0c2b3997599832"
|
SRC_URI[md5sum] = "5373ebb2f78e27e14d0c2b3997599832"
|
||||||
SRC_URI[sha256sum] = "eb13966ecaa61baff53f19b03e97f0e7ca7103a25d89c7540f6e8d7d98bf59bd"
|
SRC_URI[sha256sum] = "eb13966ecaa61baff53f19b03e97f0e7ca7103a25d89c7540f6e8d7d98bf59bd"
|
||||||
|
|
Loading…
Reference in New Issue