summaryrefslogtreecommitdiffstats
path: root/src/android/jar
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@digia.com>2013-10-02 10:57:22 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-03 16:20:54 +0200
commitb3535f3926a42a254985c456e9231768aade3595 (patch)
tree5e7c99881b8d8856a3801c6aa68d901814d2129b /src/android/jar
parent5f4c75a50e8268d9bba20a6ad8fbdcf1b081005d (diff)
Android: Don't throw away slow-moving mouse/touch events
When doing slow, precise movements, some devices will report differences of less than 1 pixel. This would mark the points as stationary, meaning that Qt would discard them without reporting. On the three devices I have tested, stationary points are reported with a 0.0 difference. If any devices are reporting noisy values, it is still safer to test for equality, since it is much better to report too many move events than to not report any. Task-number: QTBUG-33729 Change-Id: If20f2758f5a5ec0917184345b558f55a3d383807 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/android/jar')
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtNative.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
index f5bfe7e029..1385c90e3e 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
@@ -297,8 +297,8 @@ public class QtNative
if (action == MotionEvent.ACTION_MOVE) {
int hsz = event.getHistorySize();
if (hsz > 0) {
- if (Math.abs(event.getX(index) - event.getHistoricalX(index, hsz-1)) > 1
- || Math.abs(event.getY(index) - event.getHistoricalY(index, hsz-1)) > 1) {
+ if (event.getX(index) != event.getHistoricalX(index, hsz-1)
+ || event.getY(index) != event.getHistoricalY(index, hsz-1)) {
return 1;
} else {
return 2;