diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-08-21 10:45:27 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-09 14:39:39 +0000 |
commit | e67ebe8ba4f59a4554a47fa26e9c374b1022d36f (patch) | |
tree | ffdb0e67ee9e167a3f84babb1b77d53d64273388 /src/plugins/platforms/xcb/qxcbconnection.h | |
parent | e558e71791bb0cdcf77f81fe904c61597c01ae1e (diff) |
Listen to XI2 deviceChanged events to reset last position
Some drivers appears to reset their scroll positions when make the
primary point. This patch listens for the device changed event and uses
the information in it to update the position.
Task-number: QTBUG-40829
Change-Id: If354dfde6300ceb2b81be14ea24594ab0658a6aa
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index 7286b6b89b..4d0596550c 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -506,6 +506,7 @@ private: XInput2TouchDeviceData *touchDeviceForId(int id); void xi2HandleEvent(xcb_ge_event_t *event); void xi2HandleHierachyEvent(void *event); + void xi2HandleDeviceChangedEvent(void *event); int m_xiOpCode, m_xiEventBase, m_xiErrorBase; #ifndef QT_NO_TABLETEVENT struct TabletData { @@ -539,6 +540,7 @@ private: Qt::Orientations legacyOrientations; QPointF lastScrollPosition; }; + void updateScrollingDevice(ScrollingDevice& scrollingDevice, int num_classes, void *classes); void xi2HandleScrollEvent(void *event, ScrollingDevice &scrollingDevice); QHash<int, ScrollingDevice> m_scrollingDevices; #endif // XCB_USE_XINPUT2 |