summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-08 12:22:36 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-08 12:22:36 (GMT)
commit14e4314b5c2cfddb1e92fa1fefeaf7bea2dd6b3a (patch)
treefdbda4f12d72d0e42fc1f6233eb8f88e84eae295
parent65df0d15038a89810567662644089a197bb8016b (diff)
downloadQt-14e4314b5c2cfddb1e92fa1fefeaf7bea2dd6b3a.zip
Qt-14e4314b5c2cfddb1e92fa1fefeaf7bea2dd6b3a.tar.gz
Qt-14e4314b5c2cfddb1e92fa1fefeaf7bea2dd6b3a.tar.bz2
Fix raw translation on Windows
We don't keep the state from the previous events anymore, so the 'down' variable is useless (and actually caused problems).
-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);