mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 00:30:15 +01:00
udev-seat: Fail input setup only if no devices are found
Rather than failing if we cannot open any single device fail the input setup if there are no input devices added. https://bugs.freedesktop.org/show_bug.cgi?id=64506
This commit is contained in:
parent
790c9a1faf
commit
a777610a77
1 changed files with 3 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master)
|
|||
fd = weston_launcher_open(c, devnode, O_RDWR | O_NONBLOCK);
|
||||
if (fd < 0) {
|
||||
weston_log("opening input device '%s' failed.\n", devnode);
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
device = evdev_device_create(&master->base, devnode, fd);
|
||||
|
|
@ -69,7 +69,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master)
|
|||
} else if (device == NULL) {
|
||||
close(fd);
|
||||
weston_log("failed to create input device '%s'.\n", devnode);
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
calibration_values =
|
||||
|
|
@ -140,6 +140,7 @@ udev_seat_add_devices(struct udev_seat *seat, struct udev *udev)
|
|||
"\t- seats misconfigured "
|
||||
"(Weston backend option 'seat', "
|
||||
"udev device property ID_SEAT)\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue