types/wlr_touch: add base wlr_input_device

wlr_touch now owns its wlr_input_device. It will be initialized when the
tablet tool is initialized, and finished when the touch is destroyed.
This commit is contained in:
Simon Zeni 2022-02-01 11:51:50 -05:00 committed by Kirill Primak
parent 7dfee50350
commit edfb332b24
8 changed files with 24 additions and 15 deletions

View file

@ -16,7 +16,10 @@ struct wlr_touch *create_libinput_touch(
wlr_log(WLR_ERROR, "Unable to allocate wlr_touch");
return NULL;
}
wlr_touch_init(wlr_touch, NULL);
const char *name = libinput_device_get_name(libinput_dev);
wlr_touch_init(wlr_touch, NULL, name);
wlr_touch->base.vendor = libinput_device_get_id_vendor(libinput_dev);
wlr_touch->base.product = libinput_device_get_id_product(libinput_dev);
return wlr_touch;
}