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>
This commit is contained in:
parent
21c07f56e2
commit
43c4d909c5
@ -350,6 +350,11 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data)
|
||||
m_currentSlot = data->value;
|
||||
}
|
||||
|
||||
} else if (data->type == EV_KEY && !m_typeB) {
|
||||
if (data->code == BTN_TOUCH && data->value == 0)
|
||||
{
|
||||
m_contacts[m_currentSlot].state = Qt::TouchPointReleased;
|
||||
}
|
||||
} else if (data->type == EV_SYN && data->code == SYN_MT_REPORT && m_lastEventType != EV_SYN) {
|
||||
|
||||
// If there is no tracking id, one will be generated later.
|
||||
|
Loading…
Reference in New Issue
Block a user