summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-09-06 21:28:01 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-09-08 09:37:26 +0200
commitec4c43937e905898453aefebf4b8b4d89c785689 (patch)
tree62ac82dcd85186a7dff614617f81db5dc6de0c82
parent3f32b38aed1506723b6c634f6e9f079192c13089 (diff)
Avoid useless handleTouchEvent call
The call when allReleased is true is a historical artifact: Originally the call was necessary to generate a TouchEnd. Later the determination of the event type got moved to QWindowSystemInterface. As a result the call is completely superfluous since it will bail out immediately. Task-number: QTBUG-36473 Change-Id: If1a270445a620e6f795912873c60fb1a05384964 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
-rw-r--r--src/client/qwaylandinputdevice.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 9e3fbabb1..5198a9e31 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -983,14 +983,12 @@ void QWaylandInputDevice::Touch::touch_frame()
}
QWindowSystemInterface::handleTouchEvent(window, mParent->mTouchDevice, mTouchPoints);
- const bool allReleased = allTouchPointsReleased();
- mPrevTouchPoints = mTouchPoints;
- mTouchPoints.clear();
-
- if (allReleased) {
- QWindowSystemInterface::handleTouchEvent(window, mParent->mTouchDevice, mTouchPoints);
+ if (allTouchPointsReleased())
mPrevTouchPoints.clear();
- }
+ else
+ mPrevTouchPoints = mTouchPoints;
+
+ mTouchPoints.clear();
}
QT_END_NAMESPACE