e sys - if decklock on suspend is set and systemd says we suspend, lock

if systemd suspended and we hand't triggered it, and desklock on
suspend is enabled, then lock there and then because we need to. of
course you need systemd/logind... but hey... i guess without you live
with less... :) fixes logic hole

@fix
This commit is contained in:
Carsten Haitzler 2019-08-08 09:56:04 +01:00
parent 7ab9466f77
commit 64ffda59ec
1 changed files with 12 additions and 1 deletions

View File

@ -325,7 +325,18 @@ _e_sys_systemd_signal_prepare_sleep(void *data EINA_UNUSED, const Eldbus_Message
_e_sys_comp_resume();
}
}
else _e_sys_suspended = EINA_TRUE;
else
{
_e_sys_suspended = EINA_TRUE;
if (e_config->desklock_on_suspend)
{
if (!e_desklock_state_get())
{
// XXX: this desklock - ensure its instant
e_desklock_show(EINA_TRUE);
}
}
}
}
/* externally accessible functions */