iOS: Detect/handle cancellation of subset of touch points
Change-Id: I0d345d07fe62a8c7844333bf1eed9be6d6fa432f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
parent
24d1f58414
commit
59be0509e0
@ -226,10 +226,16 @@
|
||||
|
||||
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
Q_UNUSED(touches) // ### can a subset of the active touches be cancelled?
|
||||
if (!touches) {
|
||||
m_activeTouches.clear();
|
||||
} else {
|
||||
for (UITouch *touch in touches)
|
||||
m_activeTouches.remove(touch);
|
||||
|
||||
Q_ASSERT_X(m_activeTouches.isEmpty(), Q_FUNC_INFO,
|
||||
"Subset of active touches cancelled by UIKit");
|
||||
}
|
||||
|
||||
// Clear current touch points
|
||||
m_activeTouches.clear();
|
||||
m_nextTouchId = 0;
|
||||
|
||||
// Send cancel touch event synchronously
|
||||
|
Loading…
Reference in New Issue
Block a user