WinRT QPA: Fix touch release on phone

The IsInContact API is not reliable on phone, so use IsLeftButtonPressed
instead.

Change-Id: If17089f976586879355f127dadbe394b57afe3c3
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
bb10
Maurice Kalinowski 2013-10-06 15:37:33 +03:00 committed by The Qt Project
parent e31be2964e
commit df25dfef46
1 changed files with 4 additions and 0 deletions

View File

@ -866,7 +866,11 @@ HRESULT QWinRTScreen::onPointerUpdated(ICoreWindow *window, IPointerEventArgs *a
QHash<quint32, QWindowSystemInterface::TouchPoint>::iterator it = m_touchPoints.find(id);
if (it != m_touchPoints.end()) {
boolean isPressed;
#ifndef Q_OS_WINPHONE
pointerPoint->get_IsInContact(&isPressed);
#else
properties->get_IsLeftButtonPressed(&isPressed); // IsInContact not reliable on phone
#endif
it.value().state = isPressed ? Qt::TouchPointMoved : Qt::TouchPointReleased;
} else {
it = m_touchPoints.insert(id, QWindowSystemInterface::TouchPoint());