aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm2/ecore_drm2_device.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-05-23 12:53:49 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commitc1253164b2bc944b37b5d04b7b5814f6bbcde8bb (patch)
treec35da892e92187fb315d929a78e037f15165dfd3 /src/lib/ecore_drm2/ecore_drm2_device.c
parentecore-drm2: Add API function to set left-handed mouse mode (diff)
downloadefl-c1253164b2bc944b37b5d04b7b5814f6bbcde8bb.tar.gz
ecore-drm2: perform logind connection after finding device path in ecore_drm2_device_find
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_device.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index 1e9ded816e..ca43bcff95 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -104,13 +104,6 @@ ecore_drm2_device_find(const char *seat, unsigned int tty, Eina_Bool sync)
dev = calloc(1, sizeof(Ecore_Drm2_Device));
if (!dev) return NULL;
- dev->em = elput_manager_connect(seat, tty, sync);
- if (!dev->em)
- {
- ERR("Could not connect to input manager");
- goto man_err;
- }
-
dev->path = _drm2_device_find(seat);
if (!dev->path)
{
@@ -118,11 +111,18 @@ ecore_drm2_device_find(const char *seat, unsigned int tty, Eina_Bool sync)
goto path_err;
}
+ dev->em = elput_manager_connect(seat, tty, sync);
+ if (!dev->em)
+ {
+ ERR("Could not connect to input manager");
+ goto man_err;
+ }
+
return dev;
-path_err:
- elput_manager_disconnect(dev->em);
man_err:
+ eina_stringshare_del(dev->path);
+path_err:
free(dev);
return NULL;
}