diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-16 11:26:54 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-10-20 19:21:50 +0200 |
commit | 8ba59441fc62c567b1e8dadce5f6e044caa67e49 (patch) | |
tree | 90ab700464007bb184c91fe81614cd42b3afc0b9 /src/plugins/platforms/windows/qwindowspointerhandler.h | |
parent | abb5f0d3768a817b7e30639107210e64b8dbc138 (diff) |
Windows QPA/WmPointer: Register tablet devices of pointer handler
Task-number: QTBUG-46412
Change-Id: Ib9b5fd6056a5474ce46c7bde53be7a12c1494611
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowspointerhandler.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowspointerhandler.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.h b/src/plugins/platforms/windows/qwindowspointerhandler.h index 3b204c675b..d0f0b816d3 100644 --- a/src/plugins/platforms/windows/qwindowspointerhandler.h +++ b/src/plugins/platforms/windows/qwindowspointerhandler.h @@ -45,6 +45,7 @@ #include <QtCore/qpointer.h> #include <QtCore/qscopedpointer.h> +#include <QtCore/qsharedpointer.h> #include <QtCore/qhash.h> #include <QtGui/qevent.h> @@ -57,6 +58,8 @@ class QWindowsPointerHandler { Q_DISABLE_COPY_MOVE(QWindowsPointerHandler) public: + using QPointingDevicePtr = QSharedPointer<QPointingDevice>; + QWindowsPointerHandler() = default; ~QWindowsPointerHandler(); bool translatePointerEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result); @@ -76,8 +79,14 @@ private: bool translateMouseWheelEvent(QWindow *window, QWindow *currentWindowUnderPointer, MSG msg, QPoint globalPos, Qt::KeyboardModifiers keyModifiers); void handleCaptureRelease(QWindow *window, QWindow *currentWindowUnderPointer, HWND hwnd, QEvent::Type eventType, Qt::MouseButtons mouseButtons); void handleEnterLeave(QWindow *window, QWindow *currentWindowUnderPointer, QPoint globalPos); +#if QT_CONFIG(tabletevent) + QPointingDevicePtr findTabletDevice(QPointingDevice::PointerType pointerType) const; +#endif QPointingDevice *m_touchDevice = nullptr; +#if QT_CONFIG(tabletevent) + QList<QPointingDevicePtr> m_tabletDevices; +#endif QHash<int, QPointF> m_lastTouchPositions; QHash<DWORD, int> m_touchInputIDToTouchPointID; QPointer<QWindow> m_windowUnderPointer; |