Skip to content

SIS: Fix touch-up issue

Felix Gerking requested to merge fix_sis_touch-release_events into dunfell

Sometimes we get no touchup signal in Qt. This was seen with the QML drag-and-drop example.

Looking at the output of evtest of the sis input device, you see different behavior for a working and a missing touch-up.

Failed:

...
Event: time 1587646331.383580, type 3 (EV_ABS), code 0 (ABS_X), value 2365
Event: time 1587646331.383580, type 3 (EV_ABS), code 1 (ABS_Y), value 2894
Event: time 1587646331.383580, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2365
Event: time 1587646331.383580, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2894
Event: time 1587646331.383580, -------------- SYN_REPORT ------------
Event: time 1587646331.402073, type 3 (EV_ABS), code 0 (ABS_X), value 2367
Event: time 1587646331.402073, type 3 (EV_ABS), code 1 (ABS_Y), value 2887
Event: time 1587646331.402073, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1587646331.402073, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 0
Event: time 1587646331.402073, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 2367
Event: time 1587646331.402073, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 2887
Event: time 1587646331.402073, -------------- SYN_REPORT ------------

Good

Event: time 1587646407.907930, -------------- SYN_REPORT ------------
Event: time 1587646407.922769, type 3 (EV_ABS), code 0 (ABS_X), value 790
Event: time 1587646407.922769, type 3 (EV_ABS), code 1 (ABS_Y), value 1747
Event: time 1587646407.922769, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 790
Event: time 1587646407.922769, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1747
Event: time 1587646407.922769, -------------- SYN_REPORT ------------
Event: time 1587646407.945577, type 3 (EV_ABS), code 0 (ABS_X), value 840
Event: time 1587646407.945577, type 3 (EV_ABS), code 1 (ABS_Y), value 1918
Event: time 1587646407.945577, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 840
Event: time 1587646407.945577, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1918
Event: time 1587646407.945577, -------------- SYN_REPORT ------------
Event: time 1587646407.968810, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1587646407.968810, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 0
Event: time 1587646407.968810, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1587646407.968810, -------------- SYN_REPORT ------------

It seems that the @ABS_MT_TRACKING_ID value -1@ is missing somehow.

This might be the case when the driver sends a valid coodinate but also states that the pressure is 0.

Fix this by sending a touch-up (all ABS_PRESSUE, ABS_MT_PRESSURE, and ABS_BUTTON 0 and ABS_MT_TRACKING_ID -1) when pressure is 0.

BCS 746-000871

Merge request reports

Loading