diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-15 01:00:11 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-11-15 16:29:40 +0100 |
commit | adc7bbe910a4b89a579ffa93da5a937cfc1379f4 (patch) | |
tree | e28a2fadc82652798302cc7f79a6f4310a2eb8d7 /src/platformsupport | |
parent | 14bb413309092adc53e8451daff5690c4698c07d (diff) | |
parent | c15a069830baf87f57c84e86326cf86ba9a39713 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
src/gui/rhi/qshader.cpp
tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp
Change-Id: I1c4ae718eb3592a0a0a90af9d11553f3ab68cad5
Diffstat (limited to 'src/platformsupport')
-rw-r--r-- | src/platformsupport/input/libinput/qlibinputtouch.cpp | 16 |
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')"); } |