summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/input')
-rw-r--r--src/platformsupport/input/libinput/qlibinputtouch.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/platformsupport/input/libinput/qlibinputtouch.cpp b/src/platformsupport/input/libinput/qlibinputtouch.cpp
index a65bc91c39..ad85360b0e 100644
--- a/src/platformsupport/input/libinput/qlibinputtouch.cpp
+++ b/src/platformsupport/input/libinput/qlibinputtouch.cpp
@@ -113,16 +113,16 @@ void QLibInputTouch::processTouchMotion(libinput_event_touch *e)
DeviceState *state = deviceState(e);
QWindowSystemInterface::TouchPoint *tp = state->point(slot);
if (tp) {
+ Qt::TouchPointState tmpState = Qt::TouchPointMoved;
const QPointF p = getPos(e);
- if (tp->area.center() != p) {
+ if (tp->area.center() == p)
+ tmpState = Qt::TouchPointStationary;
+ else
tp->area.moveCenter(p);
- // 'down' may be followed by 'motion' within the same "frame".
- // Handle this by compressing and keeping the Pressed state until the 'frame'.
- if (tp->state != Qt::TouchPointPressed)
- tp->state = Qt::TouchPointMoved;
- } else {
- tp->state = Qt::TouchPointStationary;
- }
+ // 'down' may be followed by 'motion' within the same "frame".
+ // Handle this by compressing and keeping the Pressed state until the 'frame'.
+ if (tp->state != Qt::TouchPointPressed && tp->state != Qt::TouchPointReleased)
+ tp->state = tmpState;
} else {
qWarning("Inconsistent touch state (got 'motion' without 'down')");
}