mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
types/wlr_pointer: add base wlr_input_device
wlr_pointer owns its wlr_input_device. It will be initialized when the pointer is initialized, and finished when the pointer is destroyed.
This commit is contained in:
parent
a1978b1299
commit
d5480efc7a
10 changed files with 53 additions and 51 deletions
|
|
@ -16,7 +16,10 @@ struct wlr_pointer *create_libinput_pointer(
|
|||
wlr_log(WLR_ERROR, "Unable to allocate wlr_pointer");
|
||||
return NULL;
|
||||
}
|
||||
wlr_pointer_init(wlr_pointer, NULL);
|
||||
const char *name = libinput_device_get_name(libinput_dev);
|
||||
wlr_pointer_init(wlr_pointer, NULL, name);
|
||||
wlr_pointer->base.vendor = libinput_device_get_id_vendor(libinput_dev);
|
||||
wlr_pointer->base.product = libinput_device_get_id_product(libinput_dev);
|
||||
return wlr_pointer;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue