diff options
author | André de la Rocha <andre.rocha@qt.io> | 2021-11-16 00:07:09 +0100 |
---|---|---|
committer | André de la Rocha <andre.rocha@qt.io> | 2021-11-18 23:41:02 +0100 |
commit | 8283df4d8cee7e80ce36e724ae0824fd1e00cb24 (patch) | |
tree | 70b3304df56051055c12c598b8ae8dffe7c8b59a /src/plugins/platforms/windows/qwindowspointerhandler.h | |
parent | 3cc1a32f97d2d3fe4a4c4eb83b46bdeb79cd64c3 (diff) |
Windows QPA: Fix multi-touch support in some devices
Some multi-touch devices send touch information for each finger using
different WM_POINTER messages/frames, instead of a single one with
a list of touches, like most devices. This would result in the generation
of multiple touch events, which can cause unexpected behavior in
applications (the QTouchEvent documentation specifies that it should
contain all simultaneous touches). This patch adds a workaround to
ensure all simultaneous touches are included in the events, to comply
with the expected behavior.
Pick-to: 6.2 5.15
Change-Id: I12a2f84b35a6bdd49ee53d25de580c0941a9aea6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowspointerhandler.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowspointerhandler.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.h b/src/plugins/platforms/windows/qwindowspointerhandler.h index 5b6179b7fa..376902c530 100644 --- a/src/plugins/platforms/windows/qwindowspointerhandler.h +++ b/src/plugins/platforms/windows/qwindowspointerhandler.h @@ -48,6 +48,7 @@ #include <QtCore/qsharedpointer.h> #include <QtCore/qhash.h> #include <QtGui/qevent.h> +#include <qpa/qwindowsysteminterface.h> QT_BEGIN_NAMESPACE @@ -88,7 +89,7 @@ private: QList<QPointingDevicePtr> m_tabletDevices; QPointingDevicePtr m_activeTabletDevice; #endif - QHash<int, QPointF> m_lastTouchPositions; + QHash<int, QWindowSystemInterface::TouchPoint> m_lastTouchPoints; QHash<DWORD, int> m_touchInputIDToTouchPointID; QPointer<QWindow> m_windowUnderPointer; QPointer<QWindow> m_currentWindow; |