From 96ccc50c5753346e852625fe37418a54386c7804 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Tue, 8 Mar 2022 16:54:28 -0500 Subject: types/wlr_input_device: move width_mm and height_mm fields to wlr_tablet and wlr_touch --- backend/libinput/tablet_tool.c | 3 +++ backend/libinput/touch.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'backend/libinput') diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c index c778ccc2..0aa960ab 100644 --- a/backend/libinput/tablet_tool.c +++ b/backend/libinput/tablet_tool.c @@ -25,6 +25,9 @@ void init_device_tablet(struct wlr_libinput_input_device *dev) { wlr_tablet->base.vendor = libinput_device_get_id_vendor(dev->handle); wlr_tablet->base.product = libinput_device_get_id_product(dev->handle); + libinput_device_get_size(dev->handle, &wlr_tablet->width_mm, + &wlr_tablet->height_mm); + struct udev_device *udev = libinput_device_get_udev_device(dev->handle); char **dst = wl_array_add(&wlr_tablet->paths, sizeof(char *)); *dst = strdup(udev_device_get_syspath(udev)); diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c index 481a5787..fba3d568 100644 --- a/backend/libinput/touch.c +++ b/backend/libinput/touch.c @@ -14,6 +14,9 @@ void init_device_touch(struct wlr_libinput_input_device *dev) { wlr_touch_init(wlr_touch, &libinput_touch_impl, name); wlr_touch->base.vendor = libinput_device_get_id_vendor(dev->handle); wlr_touch->base.product = libinput_device_get_id_product(dev->handle); + + libinput_device_get_size(dev->handle, &wlr_touch->width_mm, + &wlr_touch->height_mm); } struct wlr_libinput_input_device *device_from_touch( -- cgit v1.2.3