diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-08-21 10:38:57 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-08-21 11:03:18 +0200 |
commit | c8ca300e491c186304d0864a9e870337e891e6f7 (patch) | |
tree | f1d991c5960b5acc0bf2a709960e871d48d91acf /src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | |
parent | 31c96d34d27f8cad020238df28c10a71b2c4a34f (diff) | |
parent | 8b540f68a8404e4b9e3ac65a22c11416a91ee749 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
qmake/doc/src/qmake-manual.qdoc
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
src/src.pro
Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection_xi2.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index ee1fe44530..b144d953a7 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -419,8 +419,6 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event) touchPoint.state = Qt::TouchPointMoved; dev->pointPressedPosition[touchPoint.id] = QPointF(x, y); } - else - touchPoint.state = Qt::TouchPointStationary; break; case XI_TouchEnd: touchPoint.state = Qt::TouchPointReleased; @@ -442,9 +440,13 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event) " area " << touchPoint.area << " pressure " << touchPoint.pressure; #endif QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xiEvent->time, dev->qtTouchDevice, m_touchPoints.values()); - // If a touchpoint was released, we can forget it, because the ID won't be reused. if (touchPoint.state == Qt::TouchPointReleased) + // If a touchpoint was released, we can forget it, because the ID won't be reused. m_touchPoints.remove(touchPoint.id); + else + // Make sure that we don't send TouchPointPressed/Moved in more than one QTouchEvent + // with this touch point if the next XI2 event is about a different touch point. + touchPoint.state = Qt::TouchPointStationary; } } #endif // XCB_USE_XINPUT22 |