Created attachment 126092 [details]
evemu log for a delayed serial
Some sensors take a few events until they can read the serial number from the pen. This means that the serial is initially 0, then updates to the real serial number later.
There are a couple of options to deal with this, based on the assumption that once we announce a tool in libinput, we cannot afterwards change its serial number.
1) delay initialization of a tool until the serial comes. this would result in the device not reacting until potentially well into the interaction
2) disable serial reporting on affected tablets. this requires a hwdb
3) ignore late serials. we get a serial of 0 and that's a good hint that we just don't know yet. we can then ignore whatever serial comes next
4) a combination of 1 with memory - delay the initial sequence and remember the last-seen tool. Re-use that for the next unknown sequence and where incorrect fake a prox out + prox in for the new tool
Option 1) is complicated for making sure button events are correct. 2) requires updating of the hwdb. 3) is simple, 4) is probably the best user experience and should be implemented once 3) proves insufficient (e.g. use of multiple tools on such tablet)
Author: Peter Hutterer <firstname.lastname@example.org>
Date: Mon Aug 29 15:14:55 2016 +1000
tablet: if a serial comes in late, discard it