[PATCH libevdev] Support direct ABS_MT_TRACKING_ID changes

Peter Hutterer peter.hutterer at who-t.net
Fri Jun 29 01:08:20 UTC 2018


On Mon, Apr 16, 2018 at 07:55:14PM +0200, Benjamin Tissoires wrote:
> On Mon, Apr 16, 2018 at 7:07 AM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > Due to some decade-old misunderstanding of how tracking IDs can change in the
> > kernel, libevdev suppresses direct ABS_MT_TRACKING_ID changes. So the
> > transition that is ok is M → -1 → N, but a direct M → N change would be
> > suppressed. The cause is that most clients (at least libinput, evdev,
> > synaptics) have code like this:
> >
> >    if tracking_id == -1
> >        end_touch()
> >    else
> >        begin_new_touch()
> >
> > So a direct tracking ID change would cause new touches without terminating the
> > old touches.
> >
> > To provide a gentle switch add a new flag for libevdev_next_event() to allow
> > for direct tracking ID changes. When provided, libevdev doesn't filter those
> > direct changes and clients have to be able to cope with them directly.
> >
> > This does not apply to a duplicate -1 ABS_MT_TRACKING_ID but that would be a
> > real kernel bug.
> >
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> 
> Acked-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>

For the archives: this patch didn't get merged because the need for it
effectively disappeared with kernel commit c258e84b180d38f7.
Until we have a clear need for this, this patch won't get merged.

https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?id=c258e84b180d38f76ab9962cf5bfc10720af1360

Cheers,
   Peter


More information about the Input-tools mailing list