aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-01-31 10:20:01 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-02-21 17:11:32 +0000
commitd5480efc7a03641600df411dea93308e5edc8b27 (patch)
tree377e16476b41a7740a3cb88b5e3338da95eac6a3 /backend/libinput
parenta1978b1299952586a2fd016aab682c7fdbe735ee (diff)
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.
Diffstat (limited to 'backend/libinput')
-rw-r--r--backend/libinput/pointer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index 520f98dc..305c43d9 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -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;
}