aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/elput/elput_evdev.c4
-rw-r--r--src/lib/elput/elput_input.c4
2 files changed, 4 insertions, 4 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)))
{
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index b3567e2d43..ee7f04440c 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -180,7 +180,6 @@ _device_add(Elput_Manager *em, struct libinput_device *dev)
{
Elput_Seat *eseat;
Elput_Device *edev;
- const char *oname;
eseat = _udev_seat_get(em, dev);
if (!eseat) return;
@@ -188,9 +187,6 @@ _device_add(Elput_Manager *em, struct libinput_device *dev)
edev = _evdev_device_create(eseat, dev);
if (!edev) return;
- oname = libinput_device_get_output_name(dev);
- eina_stringshare_replace(&edev->output_name, oname);
-
eseat->devices = eina_list_append(eseat->devices, edev);
DBG("Input Device Added: %s", libinput_device_get_name(dev));