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>
This commit is contained in:
parent
0fdbe40ad4
commit
767cc05e57
@ -983,14 +983,12 @@ void QWaylandInputDevice::Touch::touch_frame()
|
|||||||
}
|
}
|
||||||
QWindowSystemInterface::handleTouchEvent(window, mParent->mTouchDevice, mTouchPoints);
|
QWindowSystemInterface::handleTouchEvent(window, mParent->mTouchDevice, mTouchPoints);
|
||||||
|
|
||||||
const bool allReleased = allTouchPointsReleased();
|
if (allTouchPointsReleased())
|
||||||
mPrevTouchPoints = mTouchPoints;
|
|
||||||
mTouchPoints.clear();
|
|
||||||
|
|
||||||
if (allReleased) {
|
|
||||||
QWindowSystemInterface::handleTouchEvent(window, mParent->mTouchDevice, mTouchPoints);
|
|
||||||
mPrevTouchPoints.clear();
|
mPrevTouchPoints.clear();
|
||||||
}
|
else
|
||||||
|
mPrevTouchPoints = mTouchPoints;
|
||||||
|
|
||||||
|
mTouchPoints.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user