diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 5ef453d..ea10fce 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -5260,7 +5260,6 @@ void QApplicationPrivate::updateTouchPointsForWidget(QWidget *widget, QTouchEven rect.moveCenter(widget->mapFromGlobal(screenPos.toPoint()) + delta); touchPoint.setRect(rect); - touchPoint.setStartPos(widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta); touchPoint.setLastPos(widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta); } @@ -5331,6 +5330,8 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, d->widgetForTouchPointId[touchPoint.id()] = widget; touchPoint.setStartScreenPos(touchPoint.screenPos()); touchPoint.setLastScreenPos(touchPoint.screenPos()); + if (touchPoint.pressure() < qreal(0.)) + touchPoint.setPressure(qreal(1.)); d->appCurrentTouchPoints.insert(touchPoint.id(), touchPoint); break; } @@ -5343,6 +5344,8 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.take(touchPoint.id()); touchPoint.setStartScreenPos(previousTouchPoint.startScreenPos()); touchPoint.setLastScreenPos(previousTouchPoint.screenPos()); + if (touchPoint.pressure() < qreal(0.)) + touchPoint.setPressure(qreal(0.)); break; } default: @@ -5353,6 +5356,8 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.value(touchPoint.id()); touchPoint.setStartScreenPos(previousTouchPoint.startScreenPos()); touchPoint.setLastScreenPos(previousTouchPoint.screenPos()); + if (touchPoint.pressure() < qreal(0.)) + touchPoint.setPressure(qreal(0.)); d->appCurrentTouchPoints[touchPoint.id()] = touchPoint; break; } |