diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-05-05 08:41:22 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-05 07:48:23 +0200 |
commit | 3f885939c059605a9324a94e488793455c9cd848 (patch) | |
tree | b1c978c303407ec525b9dd416f29ae7ed9adb1e1 /src/plugins/platforms/winrt/qwinrtscreen.h | |
parent | 9ae89313e43689483282ac330ad189db89bfcbba (diff) |
WinRT: Fix multi-touch on PC
The pointer ID was incorrectly interpreted as a device ID, which caused
creating a new QTouchDevice for each touch update and potential crashes
in QtQuick. The handling has now been simplified and aligned with Windows
Phone, treating all touch events as if they originate from the same
device. Given that the native device has no ID, it is not
possible to track the native device between events anyway (even the
pointer values change).
Task-number: QTBUG-38745
Change-Id: I24b6c00b765dcb49cd653638afafc04fdd80f774
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtscreen.h')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtscreen.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.h b/src/plugins/platforms/winrt/qwinrtscreen.h index c6511e9446..753d89541c 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.h +++ b/src/plugins/platforms/winrt/qwinrtscreen.h @@ -101,12 +101,6 @@ class QWinRTPageFlipper; class QWinRTCursor; class QWinRTInputContext; -struct Pointer { - enum Type { Unknown, Mouse, TouchScreen, Tablet }; - Type type; - QTouchDevice *device; -}; - class QWinRTScreen : public QPlatformScreen { public: @@ -165,6 +159,7 @@ private: ABI::Windows::UI::Core::ICoreWindow *m_coreWindow; ABI::Windows::UI::ViewManagement::IApplicationViewStatics *m_applicationView; ABI::Windows::ApplicationModel::Core::ICoreApplication *m_application; + QRect m_geometry; QImage::Format m_format; QSurfaceFormat m_surfaceFormat; @@ -183,7 +178,7 @@ private: #ifndef Q_OS_WINPHONE QHash<quint32, QPair<Qt::Key, QString> > m_activeKeys; #endif - QHash<quint32, Pointer> m_pointers; + QTouchDevice *m_touchDevice; QHash<quint32, QWindowSystemInterface::TouchPoint> m_touchPoints; }; |