68369237bf
If an application has two windows, and the user tries to do multi-touch gestures with different fingers in each window at the same time, we want the touchpoint IDs to be unique. m_nextTouchId was a per-window variable before; the result was that the QEventPoint delivered to the second window was replacing values (including QEventPointPrivate::window) in the persistent QEventPoint that was still being held in the first window; then when the release of the first point occurred, QGuiApplicationPrivate::processTouchEvent() saw its destination window pointer as null because the second touchpoint had already been released. QEventPoint::id is of type int, with negative values being invalid. nextTouchId is of type quint16 so that it will always be positive, and we can let it eventually overflow (wrap back to 0) rather than resetting it to 0 after each touch gesture. The only requirement is that the IDs need to be unique and positive (and typically they are sequential: that makes debug output easier to understand). Task-number: QTBUG-118909 Change-Id: Ia0f1edc9a5e2b362028bed4418fed228814cddb6 Pick-to: 6.5 6.6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
LICENSES | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.tag | ||
CMakeLists.txt | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
qt_cmdline.cmake |