summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_evdev.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-02-07 11:33:25 -0500
committerChris Michael <cp.michael@samsung.com>2017-02-07 11:33:25 -0500
commit661c19a514b8ccb0c0e31a31b5cf9b945b401cf6 (patch)
tree761d6d3aef3d00ea87349ef4c3445b78330a49eb /src/lib/elput/elput_evdev.c
parente9b8dcf442d65b13e9db4cf0ba8b4f72721205d6 (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')
-rw-r--r--src/lib/elput/elput_evdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 9580f49909..b022a6fe0d 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -1252,6 +1252,7 @@ Elput_Device *
1252_evdev_device_create(Elput_Seat *seat, struct libinput_device *device) 1252_evdev_device_create(Elput_Seat *seat, struct libinput_device *device)
1253{ 1253{
1254 Elput_Device *edev; 1254 Elput_Device *edev;
1255 const char *oname;
1255 1256
1256 edev = calloc(1, sizeof(Elput_Device)); 1257 edev = calloc(1, sizeof(Elput_Device));
1257 if (!edev) return NULL; 1258 if (!edev) return NULL;
@@ -1260,6 +1261,9 @@ _evdev_device_create(Elput_Seat *seat, struct libinput_device *device)
1260 edev->device = device; 1261 edev->device = device;
1261 edev->caps = 0; 1262 edev->caps = 0;
1262 1263
1264 oname = libinput_device_get_output_name(device);
1265 eina_stringshare_replace(&edev->output_name, oname);
1266
1263 if ((libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_KEYBOARD)) && 1267 if ((libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_KEYBOARD)) &&
1264 (libinput_device_keyboard_has_key(device, KEY_ENTER))) 1268 (libinput_device_keyboard_has_key(device, KEY_ENTER)))
1265 { 1269 {