mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
backend/libinput: add devices wl_list
This commit prepares the ground for a wlr_libinput_input_device refactoring.
This commit is contained in:
parent
0a5a65cf48
commit
9dd6e2b905
3 changed files with 21 additions and 2 deletions
|
|
@ -224,6 +224,16 @@ static void handle_device_removed(struct wlr_libinput_backend *backend,
|
|||
int product = libinput_device_get_id_product(libinput_dev);
|
||||
const char *name = libinput_device_get_name(libinput_dev);
|
||||
wlr_log(WLR_DEBUG, "Removing %s [%d:%d]", name, vendor, product);
|
||||
|
||||
if (!wl_list_empty(&backend->devices)) {
|
||||
struct wlr_libinput_input_device *dev, *tmp_dev;
|
||||
wl_list_for_each_safe(dev, tmp_dev, &backend->devices, link) {
|
||||
if (dev->handle == libinput_dev) {
|
||||
destroy_libinput_input_device(dev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!wlr_devices) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue