From df25dfef46b1174e6f545e681be3f0ef1541fd75 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Sun, 6 Oct 2013 15:37:33 +0300 Subject: [PATCH] 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 Reviewed-by: Oliver Wolff Reviewed-by: Friedemann Kleint --- src/plugins/platforms/winrt/qwinrtscreen.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index 93c2736238..59182ca183 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -866,7 +866,11 @@ HRESULT QWinRTScreen::onPointerUpdated(ICoreWindow *window, IPointerEventArgs *a QHash::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());