summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_win.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 4bbec96..8145702 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -4022,28 +4022,26 @@ bool QApplicationPrivate::translateTouchEvent(const MSG &msg)
QTouchEvent::TouchPoint touchPoint(touchPointID);
// update state
- bool down = touchPoint.state() != Qt::TouchPointReleased;
QPointF globalPos(qreal(touchInput.x) / qreal(100.), qreal(touchInput.y) / qreal(100.));
QSizeF contactArea = (touchInput.dwMask & TOUCHINPUTMASKF_CONTACTAREA)
? QSizeF(qreal(touchInput.cxContact) / qreal(100.),
qreal(touchInput.cyContact) / qreal(100.))
: QSizeF();
- if (!down && (touchInput.dwFlags & TOUCHEVENTF_DOWN)) {
+ if (touchInput.dwFlags & TOUCHEVENTF_DOWN) {
touchPoint.setState(Qt::TouchPointPressed);
touchPoint.setGlobalPos(globalPos);
touchPoint.setSize(contactArea);
- } else if (down && (touchInput.dwFlags & TOUCHEVENTF_UP)) {
+ } else if (touchInput.dwFlags & TOUCHEVENTF_UP) {
touchPoint.setState(Qt::TouchPointReleased);
touchPoint.setGlobalPos(globalPos);
touchPoint.setSize(QSizeF());
- } else if (down) {
+ } else {
touchPoint.setState(globalPos == touchPoint.globalPos()
? Qt::TouchPointStationary
: Qt::TouchPointMoved);
touchPoint.setGlobalPos(globalPos);
touchPoint.setSize(contactArea);
- // pressure should still be 1.
}
touchPoints.append(touchPoint);