evdev: get the current slot value from the absinfo struct or mtdev
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 7 Aug 2013 01:04:46 +0000 (11:04 +1000)
committerJonas Ådahl <jadahl@gmail.com>
Sun, 10 Nov 2013 16:51:32 +0000 (17:51 +0100)
commit3fe16ee03b549e8be063714ed951bef4dd0bfc63
treeb920d7485a2ad7372b945c40a71e0ca260628233
parentfe57a4e5fae8aa28b2ed3238ef89487087ecb282
evdev: get the current slot value from the absinfo struct or mtdev

If touches are already present on the device, absinfo has the currently
active touch slot. There's a race condition where the slot may change before
we enable the fd and we thus miss out on the ABS_MT_SLOT event. It's still
slightly more correct than assuming whatever comes next is slot 0.
src/evdev.c