mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
types/wlr_switch: add base wlr_input_device
wlr_switch owns its wlr_input_device. It will be initialized when the switch is initialized, and finished when the switch is destroyed.
This commit is contained in:
parent
d5480efc7a
commit
0f3b38365d
4 changed files with 15 additions and 4 deletions
|
|
@ -16,8 +16,11 @@ struct wlr_switch *create_libinput_switch(
|
|||
wlr_log(WLR_ERROR, "Unable to allocate wlr_switch");
|
||||
return NULL;
|
||||
}
|
||||
wlr_switch_init(wlr_switch, NULL);
|
||||
wlr_log(WLR_DEBUG, "Created switch for device %s", libinput_device_get_name(libinput_dev));
|
||||
const char *name = libinput_device_get_name(libinput_dev);
|
||||
wlr_switch_init(wlr_switch, NULL, name);
|
||||
wlr_log(WLR_DEBUG, "Created switch for device %s", name);
|
||||
wlr_switch->base.vendor = libinput_device_get_id_vendor(libinput_dev);
|
||||
wlr_switch->base.product = libinput_device_get_id_product(libinput_dev);
|
||||
return wlr_switch;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue