on xenial help sign in
Use position rather than ID to determine touch point

Using the id() of a TouchPoint does not give the same ID used to create and move it. The ID of .press() and friends only determine the finger or cursor to act on. This may have worked before due to an implementation detail of the xcb or Mir QPAs. See also https://doc.qt.io/qt-5/qtouchevent-touchpoint.html#id

commitc291fdf43bbf287e2186c3ecf6a9ed1acfb7c0de authorDalton Durst <d@ltondur.st> dateThu 11 Apr 2019, 17:05 (8 years ago) parent5ba038c
1 file changed+1−1
tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp+1−1
tests/plugins/Ubuntu/Gestures/tst_TouchGate.cpp+1−1
@@ -375,7 +375,7 @@ void tst_TouchGate::disabledWhileHoldingTouch()
375375 // it got only the new touch point.
376376 QSharedPointer<QTouchEvent> touchEvent = testItem->touchEventsReceived[0];
377377 QCOMPARE(touchEvent->touchPoints().count(), 1);
378− QCOMPARE(touchEvent->touchPoints()[0].id(), 1);
378+ QCOMPARE(touchEvent->touchPoints()[0].pos(), QPointF(200, 200));
379379 }
380380}
381381