From 4ab691ad65967be01e4d4eb90c2b044e0307fa77 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 17 Oct 2011 14:24:41 +0200 Subject: 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 --- src/plugins/platforms/xcb/qxcbconnection_maemo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins') 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); } } } -- cgit v1.2.3