diff options
author | emersion <contact@emersion.fr> | 2018-04-30 10:55:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-30 10:55:25 +0100 |
commit | 509d38425c33524c77bfb4aa89676d57c21fcd11 (patch) | |
tree | 7ee2138da910973fa5a7d8722ec400679d5d5bb2 /backend/libinput/events.c | |
parent | a0f490306395ac3705c00ecc85b4a0bba721886e (diff) | |
parent | 178ac8bffee3c76de39e6c0bf37838b58cb7280f (diff) |
Merge pull request #930 from emersion/input-device-output-name
Add wlr_input_device.output_name
Diffstat (limited to 'backend/libinput/events.c')
-rw-r--r-- | backend/libinput/events.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <assert.h> #include <libinput.h> #include <stdlib.h> @@ -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); |