On Wed, Apr 09, 2014 at 09:02:09PM +0200, Jonas Ådahl wrote: > When the kernel sends multiple touch down or touch up for the same slot > in a row, ignore any such subsequent event ensuring libinput always > produces 1 x touch down -> [n x touch motion] -> 1 x touch up event > series.
fwiw, libevdev is about to handle this in 1.2 once I get the current patches reviewed. This is a kernel issue, it does duplicate removal for all events but EV_ABS and that's where the duplicate tracking ID comes from which then again triggers the duplicate touch downs/ups. Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> though I wouldn't mind error messages for this, this event is clearly a bug. I mentioned this to Hans off-list in a related email, I think we should consider adding a log_bug() macro for these things. It certainly helped me a lot in the server to be able to say "if this ever happens, this is a bug". Cheers, Peter > Signed-off-by: Jonas Ådahl <jad...@gmail.com> > --- > src/evdev.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/src/evdev.c b/src/evdev.c > index cc0c4bf..b6aaf57 100644 > --- a/src/evdev.c > +++ b/src/evdev.c > @@ -132,6 +132,9 @@ evdev_flush_pending_event(struct evdev_device *device, > uint32_t time) > if (!(device->seat_caps & EVDEV_DEVICE_TOUCH)) > break; > > + if (device->mt.slots[slot].seat_slot != -1) > + break; > + > seat_slot = ffs(~seat->slot_map) - 1; > device->mt.slots[slot].seat_slot = seat_slot; > > @@ -162,6 +165,7 @@ evdev_flush_pending_event(struct evdev_device *device, > uint32_t time) > break; > > seat_slot = device->mt.slots[slot].seat_slot; > + device->mt.slots[slot].seat_slot = -1; > > if (seat_slot == -1) > break; > @@ -174,6 +178,9 @@ evdev_flush_pending_event(struct evdev_device *device, > uint32_t time) > if (!(device->seat_caps & EVDEV_DEVICE_TOUCH)) > break; > > + if (device->abs.seat_slot != -1) > + break; > + > seat_slot = ffs(~seat->slot_map) - 1; > device->abs.seat_slot = seat_slot; > > @@ -209,6 +216,7 @@ evdev_flush_pending_event(struct evdev_device *device, > uint32_t time) > break; > > seat_slot = device->abs.seat_slot; > + device->abs.seat_slot = -1; > > if (seat_slot == -1) > break; > @@ -713,6 +721,7 @@ evdev_device_create(struct libinput_seat *seat, > > libinput_seat_ref(seat); > > + device->abs.seat_slot = -1; > device->mt.slot = -1; > device->mt.slots = NULL; > device->mt.slots_len = 0; > -- > 1.8.3.2 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel