path: root/src/lib/elput/elput_evdev.c
diff options
authorChris Michael <cp.michael@samsung.com>2017-02-07 11:33:25 -0500
committerChris Michael <cp.michael@samsung.com>2017-02-07 11:41:35 -0500
commit76e52c3e446ddd92097295e123e345b4247a4764 (patch)
tree31e0da2af867568c3db5aa8d5c1ad5dbc893688f /src/lib/elput/elput_evdev.c
parentelput: Add missing @since for new event and structure (diff)
elput: Set device output name when device is created
Small patch to set the output name of an Elput_Device when the device gets created. Note, this was already being done inside elput_input, but this patch moves it to when the device gets created. NB: Really no functional changes here, just moving a function call. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/elput/elput_evdev.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 3a7b515ad0..29c695dcec 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -1279,6 +1279,7 @@ Elput_Device *
_evdev_device_create(Elput_Seat *seat, struct libinput_device *device)
Elput_Device *edev;
+ const char *oname;
edev = calloc(1, sizeof(Elput_Device));
if (!edev) return NULL;
@@ -1287,6 +1288,9 @@ _evdev_device_create(Elput_Seat *seat, struct libinput_device *device)
edev->device = device;
edev->caps = 0;
+ oname = libinput_device_get_output_name(device);
+ eina_stringshare_replace(&edev->output_name, oname);
if ((libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_KEYBOARD)) &&
(libinput_device_keyboard_has_key(device, KEY_ENTER)))