ecore-drm: Don't init tty unless we are Not using systemd

Summary: It turns out we don't need to handle open & setup of the tty
unless we are Not using systemd. This fixes an issue during
enlightenment restart where we are unable to reopen the tty.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-01-19 12:38:12 -05:00
parent 21b34d4d84
commit 28e4901d04
1 changed files with 15 additions and 5 deletions

View File

@ -123,10 +123,15 @@ ecore_drm_launcher_connect(Ecore_Drm_Device *dev)
}
}
if (!ecore_drm_tty_open(dev, NULL))
/* NB: Hmmm, appears we don't need to open a tty if we are running
* with systemd support */
if (!logind)
{
ERR("Launcher: failed to open tty\n");
return EINA_FALSE;
if (!ecore_drm_tty_open(dev, NULL))
{
ERR("Launcher: failed to open tty\n");
return EINA_FALSE;
}
}
/* setup handler for signals */
@ -153,8 +158,13 @@ ecore_drm_launcher_disconnect(Ecore_Drm_Device *dev)
if (dev->tty.switch_hdlr) ecore_event_handler_del(dev->tty.switch_hdlr);
dev->tty.switch_hdlr = NULL;
if (!ecore_drm_tty_close(dev))
ERR("Launcher: failed to close tty\n");
/* NB: Hmmm, appears we don't need to open a tty if we are running
* with systemd support */
if (!logind)
{
if (!ecore_drm_tty_close(dev))
ERR("Launcher: failed to close tty\n");
}
if (logind)
{