diff options
author | Heikki Paajanen <heikki.paajanen@palm.com> | 2013-03-11 16:32:31 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-05 12:56:35 +0200 |
commit | 92881cd8a426b83153860fde6dd7d17c2958ee82 (patch) | |
tree | 55d3d637211f0832786349c039a79a6906385bc9 /recipes-qt | |
parent | bbaf26aec2f2b64c2d061ab4c81773d569d99d4e (diff) | |
download | meta-qt5-92881cd8a426b83153860fde6dd7d17c2958ee82.tar.gz |
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>
Diffstat (limited to 'recipes-qt')
-rw-r--r-- | recipes-qt/qt5/qtdeclarative/0001-Flickable-Fix-bug-when-flicking-twice-using-touches.patch | 39 | ||||
-rw-r--r-- | recipes-qt/qt5/qtdeclarative_5.0.0.bb | 6 |
2 files changed, 44 insertions, 1 deletions
diff --git a/recipes-qt/qt5/qtdeclarative/0001-Flickable-Fix-bug-when-flicking-twice-using-touches.patch b/recipes-qt/qt5/qtdeclarative/0001-Flickable-Fix-bug-when-flicking-twice-using-touches.patch new file mode 100644 index 00000000..650e603a --- /dev/null +++ b/recipes-qt/qt5/qtdeclarative/0001-Flickable-Fix-bug-when-flicking-twice-using-touches.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 27be7a832f017653ffda705407bb7a64246eda1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel d'Andrada <daniel.dandrada@canonical.com> | ||
3 | Date: Tue, 18 Dec 2012 10:51:21 -0200 | ||
4 | Subject: [PATCH] Flickable: Fix bug when flicking twice using touches | ||
5 | |||
6 | When you flick twice in rapid succession, in the same direction, | ||
7 | the expected behavior is for flickable to be moving quite fast in the | ||
8 | direction of the flicks. | ||
9 | |||
10 | But when you flicked using touch events instead of mouse ones, | ||
11 | the second flick caused Flickable to immediately halt. This change fixes it. | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | |||
15 | Change-Id: I02bd02fed30bd4a98959194e04f0a26b4420cd05 | ||
16 | Reviewed-by: Andras Becsi <andras.becsi@digia.com> | ||
17 | --- | ||
18 | src/quick/items/qquickflickable.cpp | 5 +++++ | ||
19 | 1 file changed, 5 insertions(+) | ||
20 | |||
21 | diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp | ||
22 | index 6e5e6b7..88ef20f 100644 | ||
23 | --- a/src/quick/items/qquickflickable.cpp | ||
24 | +++ b/src/quick/items/qquickflickable.cpp | ||
25 | @@ -2038,6 +2038,11 @@ bool QQuickFlickable::sendMouseEvent(QQuickItem *item, QMouseEvent *event) | ||
26 | |||
27 | QQuickWindow *c = window(); | ||
28 | QQuickItem *grabber = c ? c->mouseGrabberItem() : 0; | ||
29 | + if (grabber == this && d->stealMouse) { | ||
30 | + // we are already the grabber and we do want the mouse event to ourselves. | ||
31 | + return true; | ||
32 | + } | ||
33 | + | ||
34 | bool grabberDisabled = grabber && !grabber->isEnabled(); | ||
35 | bool stealThisEvent = d->stealMouse; | ||
36 | if ((stealThisEvent || contains(localPos)) && (!grabber || !grabber->keepMouseGrab() || grabberDisabled)) { | ||
37 | -- | ||
38 | 1.7.9.5 | ||
39 | |||
diff --git a/recipes-qt/qt5/qtdeclarative_5.0.0.bb b/recipes-qt/qt5/qtdeclarative_5.0.0.bb index 996792cd..518f70d6 100644 --- a/recipes-qt/qt5/qtdeclarative_5.0.0.bb +++ b/recipes-qt/qt5/qtdeclarative_5.0.0.bb | |||
@@ -7,7 +7,11 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffe | |||
7 | file://${COMMON_LICENSE_DIR}/GFDL-1.3;md5=1083add59b39991c748ea70a92166959 \ | 7 | file://${COMMON_LICENSE_DIR}/GFDL-1.3;md5=1083add59b39991c748ea70a92166959 \ |
8 | " | 8 | " |
9 | 9 | ||
10 | PR = "${INC_PR}.0" | 10 | PR = "${INC_PR}.1" |
11 | |||
12 | SRC_URI += " \ | ||
13 | file://0001-Flickable-Fix-bug-when-flicking-twice-using-touches.patch \ | ||
14 | " | ||
11 | 15 | ||
12 | SRC_URI[md5sum] = "5373ebb2f78e27e14d0c2b3997599832" | 16 | SRC_URI[md5sum] = "5373ebb2f78e27e14d0c2b3997599832" |
13 | SRC_URI[sha256sum] = "eb13966ecaa61baff53f19b03e97f0e7ca7103a25d89c7540f6e8d7d98bf59bd" | 17 | SRC_URI[sha256sum] = "eb13966ecaa61baff53f19b03e97f0e7ca7103a25d89c7540f6e8d7d98bf59bd" |