evdevtouch: also use BTN_TOUCH with value == 0 to detect TouchPointReleased
authorJon Trulson <jtrulson@ics.com>
Fri, 2 Nov 2012 21:47:19 +0000 (15:47 -0600)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sun, 11 Nov 2012 11:10:53 +0000 (12:10 +0100)
commit43c4d909c574db40d2d73b0bb04ece78746cb039
tree5022195a7a087cc4e4529311c744e15ed15890ed
parent21c07f56e27b6761d94fbb5105329e2393539f2a
evdevtouch: also use BTN_TOUCH with value == 0 to detect TouchPointReleased

The current code seems to rely on an event, ABS_MT_TOUCH_MAJOR with a
value of 0 to detect a touch release.  Not all devices[0] emit this, and
the spec[1] does not specify this behavior.

So, add a check for a BTN_TOUCH with a value of 0 to also indicate
Qt::TouchPointReleased.

[0]
http://www.chalk-elec.com/?page_id=1280#!/~/product/category=3094861&id=14647624
using hid_ntrig kernel module.

[1] https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt

Change-Id: I4fc8ff404cad2083a57ff18737c5ea2b06d8ceac
Reviewed-by: Robert Daniels <robert.daniels@vantagecontrols.com>
Reviewed-by: Laszlo Agocs <lagocs83@gmail.com>
src/platformsupport/input/evdevtouch/qevdevtouch.cpp