diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-08 11:33:28 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-08 11:33:28 +0200 |
commit | 1f35c8caa02eb9d27b87188f2fa21473ea694948 (patch) | |
tree | 918d3c9f20432204452ceab997e8c49dc2604319 /src/gui/kernel | |
parent | cc32a691936f37eaaec618a71edd62f896009c9d (diff) | |
parent | 551f73bd8d745881e70a7808385f1a35c2d12b2a (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 62b61ba320..3c85dbe097 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2697,7 +2697,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To QWindow *window = e->window.data(); typedef QPair<Qt::TouchPointStates, QList<QTouchEvent::TouchPoint> > StatesAndTouchPoints; QHash<QWindow *, StatesAndTouchPoints> windowsNeedingEvents; - bool stationaryTouchPointChangedVelocity = false; + bool stationaryTouchPointChangedProperty = false; for (int i = 0; i < e->points.count(); ++i) { QTouchEvent::TouchPoint touchPoint = e->points.at(i); @@ -2777,7 +2777,11 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To if (touchPoint.state() == Qt::TouchPointStationary) { if (touchInfo.touchPoint.velocity() != touchPoint.velocity()) { touchInfo.touchPoint.setVelocity(touchPoint.velocity()); - stationaryTouchPointChangedVelocity = true; + stationaryTouchPointChangedProperty = true; + } + if (!qFuzzyCompare(touchInfo.touchPoint.pressure(), touchPoint.pressure())) { + touchInfo.touchPoint.setPressure(touchPoint.pressure()); + stationaryTouchPointChangedProperty = true; } } else { touchInfo.touchPoint = touchPoint; @@ -2818,7 +2822,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To break; case Qt::TouchPointStationary: // don't send the event if nothing changed - if (!stationaryTouchPointChangedVelocity) + if (!stationaryTouchPointChangedProperty) continue; Q_FALLTHROUGH(); default: |