We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3989

Summary: evdev events from touchpanel not processed
Product: SDL Reporter: Srki <obucinac>
Component: atomicAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: x86_64   
OS: Linux   

Description Srki 2017-12-04 14:19:00 UTC
Tested on two touchpanels

ET&T USB 5WUSB
eGalax Inc. eGalaxTouch EXC3188-0510-08.00.00

From SDLs point of view, the difference between these two is in

src/core/linux/SDL_evdev.c

Around line 640

if (udev_class & SDL_UDEV_DEVICE_TOUCHSCREEN) {
        item->is_touchscreen = 1;

First one does not have SDL_UDEV_DEVICE_TOUCHSCREEN flag.


In function

void SDL_EVDEV_Poll(void)

There are unpromising lines, on few places:

if (!item->is_touchscreen) /* FIXME: temp hack */
    break;

All this results in SDL not sending events from the second touch panel.

ABS_MT_POSITION_X and ABS_MT_POSITION_Y do not send mouse events, there is nof  SDL_SendMouseMotion call.

ABS_X and ABS_Y are excluded because of 

case ABS_X:
    if (item->is_touchscreen) /* FIXME: temp hack */
        break;

case ABS_Y:
    if (item->is_touchscreen) /* FIXME: temp hack */
        break;



Evtest event flow for eGalax touch panel.

Event: time 1512395574.817575, -------------- SYN_REPORT ------------
Event: time 1512395574.823567, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1982
Event: time 1512395574.823567, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1760
Event: time 1512395574.823567, type 3 (EV_ABS), code 0 (ABS_X), value 1982
Event: time 1512395574.823567, type 3 (EV_ABS), code 1 (ABS_Y), value 1760
Event: time 1512395574.823567, -------------- SYN_REPORT ------------
Event: time 1512395574.835570, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1747
Event: time 1512395574.835570, type 3 (EV_ABS), code 1 (ABS_Y), value 1747
Event: time 1512395574.835570, -------------- SYN_REPORT ------------
Event: time 1512395574.841574, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1981
Event: time 1512395574.841574, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1734
Event: time 1512395574.841574, type 3 (EV_ABS), code 0 (ABS_X), value 1981
Event: time 1512395574.841574, type 3 (EV_ABS), code 1 (ABS_Y), value 1734
Event: time 1512395574.841574, -------------- SYN_REPORT ------------
Event: time 1512395574.853567, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1721
Event: time 1512395574.853567, type 3 (EV_ABS), code 1 (ABS_Y), value 1721
Event: time 1512395574.853567, -------------- SYN_REPORT ------------
Event: time 1512395574.859566, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1709
Event: time 1512395574.859566, type 3 (EV_ABS), code 1 (ABS_Y), value 1709
Event: time 1512395574.859566, -------------- SYN_REPORT ------------
Event: time 1512395574.870571, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1696
Event: time 1512395574.870571, type 3 (EV_ABS), code 1 (ABS_Y), value 1696
Event: time 1512395574.870571, -------------- SYN_REPORT ------------
Event: time 1512395574.876569, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1682
Event: time 1512395574.876569, type 3 (EV_ABS), code 1 (ABS_Y), value 1682
Event: time 1512395574.876569, -------------- SYN_REPORT ------------
Event: time 1512395574.887567, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1668
Event: time 1512395574.887567, type 3 (EV_ABS), code 1 (ABS_Y), value 1668
Event: time 1512395574.887567, -------------- SYN_REPORT ------------
Event: time 1512395574.893567, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1654
Event: time 1512395574.893567, type 3 (EV_ABS), code 1 (ABS_Y), value 1654
Event: time 1512395574.893567, -------------- SYN_REPORT ------------
Event: time 1512395574.904573, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1640
Event: time 1512395574.904573, type 3 (EV_ABS), code 1 (ABS_Y), value 1640
Event: time 1512395574.904573, -------------- SYN_REPORT ------------
Event: time 1512395574.910568, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1626
Event: time 1512395574.910568, type 3 (EV_ABS), code 1 (ABS_Y), value 1626
Event: time 1512395574.910568, -------------- SYN_REPORT ------------
Event: time 1512395574.922568, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 1980
Event: time 1512395574.922568, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1612
Event: time 1512395574.922568, type 3 (EV_ABS), code 0 (ABS_X), value 1980
Event: time 1512395574.922568, type 3 (EV_ABS), code 1 (ABS_Y), value 1612
Event: time 1512395574.922568, -------------- SYN_REPORT ------------
Event: time 1512395574.928567, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1597
Event: time 1512395574.928567, type 3 (EV_ABS), code 1 (ABS_Y), value 1597
Event: time 1512395574.928567, -------------- SYN_REPORT ------------
Event: time 1512395574.940572, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1583
Event: time 1512395574.940572, type 3 (EV_ABS), code 1 (ABS_Y), value 1583
Event: time 1512395574.940572, -------------- SYN_REPORT ------------
Event: time 1512395574.946568, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1569
Event: time 1512395574.946568, type 3 (EV_ABS), code 1 (ABS_Y), value 1569