From 2551ef8871d78a43acbbbac765919ea4f48821f9 Mon Sep 17 00:00:00 2001 From: emersion Date: Sun, 29 Apr 2018 12:15:54 +0100 Subject: input-device: add output_name field, populate it from libinput --- backend/libinput/events.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'backend') diff --git a/backend/libinput/events.c b/backend/libinput/events.c index ace21a89..2e4b7f84 100644 --- a/backend/libinput/events.c +++ b/backend/libinput/events.c @@ -1,3 +1,4 @@ +#define _POSIX_C_SOURCE 200809L #include #include #include @@ -48,6 +49,10 @@ static struct wlr_input_device *allocate_device( struct wlr_input_device *wlr_dev = &wlr_libinput_dev->wlr_input_device; libinput_device_get_size(libinput_dev, &wlr_dev->width_mm, &wlr_dev->height_mm); + const char *output_name = libinput_device_get_output_name(libinput_dev); + if (output_name != NULL) { + wlr_dev->output_name = strdup(output_name); + } wl_list_insert(wlr_devices, &wlr_dev->link); wlr_libinput_dev->handle = libinput_dev; libinput_device_ref(libinput_dev); -- cgit v1.2.3