during startup libinput detects same device twice
Summary
It is possible that the action 'LIBINPUT_EVENT_DEVICE_ADDED' is detected twice on startup. In our situation we detect the same touch device twice and so in weston we receive every touch event twice.
the problem is in static int udev_input_enable(struct libinput *libinput)
when the device is detected between
fd = udev_monitor_get_fd(input->udev_monitor);
input->udev_monitor_source = libinput_add_fd(&input->base,
fd,
evdev_udev_handler,
input);
and
if (udev_input_add_devices(input, udev) < 0) {
udev_input_disable(libinput);
return -1;
}
you should check if the device is still in the list before you add it.
- libinput version: 1.15.2