diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-02-25 14:39:51 +0300 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-12-08 12:41:04 +0000 |
commit | 2488f34ecfd68702b5508c50cca3fb8e967ac8ea (patch) | |
tree | 244cca0542cb34f8bd731e3af703013e3d09b241 /src/plugins/platforms/xcb/qxcbconnection.h | |
parent | d829dd3f445afae8c74630c4c8b93347b4a7c7bd (diff) |
xcb: Adapt QXcbWindow::startSystemResize() for touch events
Window managers typically grab the pointer after receiving
the _NET_WM_MOVERESIZE event. But they fail to do it for
touch sequences which have a receiver. So we should reject
the touch sequence before sending _NET_WM_MOVERESIZE event.
QSizeGrip calls startSystemResize() on MouseButtonPress event
which is synthesized by Qt on TouchBegin. We can find the id
of the touch point by comparing coordinates of the synthesized
MouseButtonPress event with coordinates of all TouchBegin events.
Then we use this id to reject the touch sequence (it's possible
only after receiving XI_TouchUpdate).
Change-Id: I26519840cd221e28b0be7854e4617c9aba4b0817
Task-number: QTBUG-51385
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index cb337ea0da..60f0f487c5 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -504,6 +504,7 @@ public: #endif #ifdef XCB_USE_XINPUT22 + bool startSystemResizeForTouchBegin(xcb_window_t window, const QPoint &point, Qt::Corner corner); bool xi2SetMouseGrabEnabled(xcb_window_t w, bool grab); #endif Qt::MouseButton xiToQtMouseButton(uint32_t b); @@ -639,6 +640,14 @@ private: QXcbEventReader *m_reader; #if defined(XCB_USE_XINPUT2) QHash<int, XInput2TouchDeviceData*> m_touchDevices; +#ifdef XCB_USE_XINPUT22 + struct StartSystemResizeInfo { + xcb_window_t window; + uint16_t deviceid; + uint32_t pointid; + Qt::Corner corner; + } m_startSystemResizeInfo; +#endif #endif #ifdef Q_XCB_DEBUG struct CallInfo { |