backend/libinput: use NULL to indicate missing device name

libinput guarantees that the name is non-NULL, and an empty string
if unset. However wlroots uses NULL to indicate that an input device
name is unset.
This commit is contained in:
Simon Ser 2024-02-29 12:08:02 +01:00
parent 488a23c169
commit ee70932422
8 changed files with 17 additions and 6 deletions

View file

@ -8,7 +8,7 @@ const struct wlr_touch_impl libinput_touch_impl = {
};
void init_device_touch(struct wlr_libinput_input_device *dev) {
const char *name = libinput_device_get_name(dev->handle);
const char *name = get_libinput_device_name(dev->handle);
struct wlr_touch *wlr_touch = &dev->touch;
wlr_touch_init(wlr_touch, &libinput_touch_impl, name);
wlr_touch->base.vendor = libinput_device_get_id_vendor(dev->handle);