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>
This commit is contained in:
parent
4521e2ec61
commit
4ab691ad65
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user