diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2011-10-14 15:55:35 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-17 18:03:13 +0200 |
commit | 4521e2ec61c6eddd6d4a8454f84a05d9a3195f4b (patch) | |
tree | b872d62023e05c9299a491259abdedb72c783a73 /src/plugins/platforms/xcb/qxcbconnection.h | |
parent | 09cad13e49a9b6e6be565854fa4404d604939c03 (diff) |
Add multipoint touch support for Harmattan to the xcb platform plugin.
Proper multipoint touch support was only introduced in XInput2.1, but Harmattan uses
a tweaked version of XInput2.0 that transfers touch data through mouse events.
This patch applies on the xcb plugin a subset of the changes that were applied on the
Qt 4.7 that was shipped to Harmattan to get similar multipoint touch support.
Change-Id: Ifda7ad40de29d7ded1443d4f78b3ec3807303a9f
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index 769b2e79f8..5887e57968 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -51,6 +51,10 @@ #include <QThread> #include <QVector> +#ifdef XCB_USE_XINPUT2_MAEMO +struct XInput2Data; +#endif + #define Q_XCB_DEBUG QT_BEGIN_NAMESPACE @@ -222,6 +226,22 @@ namespace QXcbAtom { XTabletStylus, XTabletEraser, + // XInput2 + ButtonLeft, + ButtonMiddle, + ButtonRight, + ButtonWheelUp, + ButtonWheelDown, + ButtonHorizWheelLeft, + ButtonHorizWheelRight, + AbsMTPositionX, + AbsMTPositionY, + AbsMTTouchMajor, + AbsMTTouchMinor, + AbsMTPressure, + AbsMTTrackingID, + MaxContacts, + NPredefinedAtoms, _QT_SETTINGS_TIMESTAMP = NPredefinedAtoms, @@ -301,6 +321,9 @@ public: #if defined(XCB_USE_EGL) || defined(XCB_USE_DRI2) void *egl_display() const { return m_egl_display; } #endif +#ifdef XCB_USE_XINPUT2_MAEMO + bool isUsingXInput2(); +#endif void sync(); void flush() { xcb_flush(m_connection); } @@ -335,6 +358,11 @@ private: #ifdef XCB_USE_DRI2 void initializeDri2(); #endif +#ifdef XCB_USE_XINPUT2_MAEMO + void initializeXInput2(); + void finalizeXInput2(); + void handleGenericEvent(xcb_ge_event_t *event); +#endif void handleClientMessageEvent(const xcb_client_message_event_t *event); xcb_connection_t *m_connection; @@ -360,6 +388,9 @@ private: void *m_xlib_display; #endif QXcbEventReader *m_reader; +#ifdef XCB_USE_XINPUT2_MAEMO + XInput2Data *m_xinputData; +#endif #ifdef XCB_USE_DRI2 uint32_t m_dri2_major; uint32_t m_dri2_minor; |