Touch end events not handled

Bug #785433 reported by Chase Douglas on 2011-05-19
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qt4-x11 (Ubuntu)
Medium
Chase Douglas
Natty
Undecided
Unassigned

Bug Description

SRU Justification:

Impact: The new multitouch functionality in Ubuntu Natty works well enough for the example applications. However, it does not handle touch end events properly, which can cause applications relying on accurate touch state to fail.

How Addressed: The current code calls the QApplication::translateRawTouchEvent function with the current touch state. However, in the case of touch end the previous state must be passed in order for the function to see what has been changed and emit the correct touch end events. The patch copies the previous state into a new array when a touch ends, and this new array is passed to the function. The application state is still updated so that reentrancy will not be a problem.

Patches:
http://bazaar.launchpad.net/~kubuntu-packagers/qt/ubuntu/revision/168
http://bazaar.launchpad.net/~kubuntu-packagers/qt/ubuntu/revision/175

Test Case: Checkout the TouchArea QML plugin here: http://qt.gitorious.org/qt-labs/qml-toucharea. Build it and then run "qmlviewer main.qml" in the TouchTest directory to launch a test application. The current code will drag the touch boxes around for up to the first two touches and then the touch boxes will cease to move with any new touches. With the fix, the touch boxes will always be controlled by touches on the application. Note that this requires a touchscreen to test.

Regression Potential: Minimal. This only affects the X11 multitouch code and has been reviewed and approved by the original Qt X11 multitouch patch developer.

-----

Touch end events from XInput 2.1 are not being handled properly by qt. QTouchEvent begin and update events come through just fine, but end events are never seen, and the touches are never removed from the list of currently active touchpoints.

Related branches

Changed in qt4-x11 (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Chase Douglas (chasedouglas)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.7.3-1ubuntu2

---------------
qt4-x11 (4:4.7.3-1ubuntu2) oneiric; urgency=low

  [ Chase Douglas ]
  * Fix touch end event handling, LP: #785433
    - Updated kubuntu_28_xi2.1.patch with the fix

  [ Didier Roche ]
  * debian/rules:
    - use -fno-strict-aliasing for now as a lot of QML codes broke because of
      aliasing wrongly optimized. Issue under work upstream. (LP: #791213)
 -- Didier Roche <email address hidden> Wed, 08 Jun 2011 17:20:48 +0200

Changed in qt4-x11 (Ubuntu):
status: In Progress → Fix Released
Denis Dzyubenko (shadone) wrote :

Thanks for fixing it Chase!

However I would suggest to make a copy of qAppPriv->appTouchPoints, then make sure that touch points are removed from it, and only then call translateRawTouch on the saved copy. This is to ensure that if translateRawTouch re-enters the event loop, we don't get into and inconsistent touch points state.

Felix Geyer (debfx) on 2011-06-12
Changed in qt4-x11 (Ubuntu):
status: Fix Released → Confirmed
Changed in qt4-x11 (Ubuntu):
status: Confirmed → Fix Released
status: Fix Released → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.7.3-1ubuntu4

---------------
qt4-x11 (4:4.7.3-1ubuntu4) oneiric; urgency=low

  [ Chase Douglas ]
  * Re-enable tablet support (LP: #762938)
  * Fix touch end event handling for reentrancy (LP: #785433)
    - Updated kubuntu_28_xi2.1.patch with the fixes

  [ Didier Roche ]
  * debian/patches/a11y_qt_and_qml_backport.diff:
    - backport patches from 4.8 to 4.7 for Qt and QML a11y support
 -- Didier Roche <email address hidden> Thu, 23 Jun 2011 09:07:42 +0200

Changed in qt4-x11 (Ubuntu):
status: Confirmed → Fix Released
description: updated
Chase Douglas (chasedouglas) wrote :

Please see attachments in bug 762938 for the Natty SRU package.

Accepted qt4-x11 into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in qt4-x11 (Ubuntu Natty):
status: New → Fix Committed
tags: added: verification-needed
Chase Douglas (chasedouglas) wrote :

I have verified that this bug is fixed in natty-proposed, and I have not noticed any regressions.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.7.2-0ubuntu6.2

---------------
qt4-x11 (4:4.7.2-0ubuntu6.2) natty-proposed; urgency=low

  * Update kubuntu_28_xi2.1.patch
    - Fix touch end event handling, LP: #785433
    - Re-enable Wacom pressure handling, LP: #762938
 -- Chase Douglas <email address hidden> Thu, 23 Jun 2011 11:23:20 -0700

Changed in qt4-x11 (Ubuntu Natty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers