From 64ffda59ec26291bf2efac30ee0115da4a75f007 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 8 Aug 2019 09:56:04 +0100 Subject: [PATCH] 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 --- src/bin/e_sys.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c index 250925b84..671fbcd9a 100644 --- a/src/bin/e_sys.c +++ b/src/bin/e_sys.c @@ -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 */