diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2011-10-17 14:24:41 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-17 18:03:13 +0200 |
commit | 4ab691ad65967be01e4d4eb90c2b044e0307fa77 (patch) | |
tree | b4bd87a56be5761ffad2beb655ac6141b87dfcf9 /src/plugins/platforms | |
parent | 4521e2ec61c6eddd6d4a8454f84a05d9a3195f4b (diff) |
Fix TouchEnd events not being received on Harmattan.
TouchEnd is sent when all the touch points have a TouchPointReleased state,
and we would clear all touch points on finger release before sending them
up the stack.
Change-Id: I14e7347090ce9a1865743202f6926ae2fc035bd3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection_maemo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp b/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp index d0529202b9..4ab7865758 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_maemo.cpp @@ -275,6 +275,9 @@ void QXcbConnection::handleGenericEvent(xcb_ge_event_t *event) if (!(active & (1 << i)) && touchPoints.at(i).state != Qt::TouchPointReleased) touchPoints[i].state = Qt::TouchPointReleased; + if (QXcbWindow *platformWindow = platformWindowFromId(xideviceevent->event)) + QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xideviceevent->time, (QEvent::Type)0 /*None*/, QTouchEvent::TouchScreen, touchPoints); + if (xideviceevent->evtype == XI_ButtonRelease) { // final event, forget touch state m_xinputData->allTouchPoints.clear(); @@ -283,8 +286,6 @@ void QXcbConnection::handleGenericEvent(xcb_ge_event_t *event) m_xinputData->allTouchPoints = touchPoints; } - if (QXcbWindow *platformWindow = platformWindowFromId(xideviceevent->event)) - QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xideviceevent->time, (QEvent::Type)0 /*None*/, QTouchEvent::TouchScreen, m_xinputData->allTouchPoints); } } } |