discomfitor pushed a commit to branch enlightenment-0.20.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=cad34648c6e321577b37cadd5f25f9958607ef2e

commit cad34648c6e321577b37cadd5f25f9958607ef2e
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue May 17 00:33:47 2016 +0900

    e - suspend.hibernat intelligently - dont account for ac power
    
    this means only lid/screen status affects intelligent suspending. it's
    not what people expect and doesnt rely on ecore getting mains power
    stuff right too.
---
 src/bin/e_actions.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c
index d2f1d71..17ca842 100644
--- a/src/bin/e_actions.c
+++ b/src/bin/e_actions.c
@@ -2454,8 +2454,7 @@ _have_lid_and_external_screens_on(void)
 
 ACT_FN_GO(suspend_smart, EINA_UNUSED)
 {
-   if ((!_have_lid_and_external_screens_on()) &&
-       (ecore_power_state_get() != ECORE_POWER_STATE_MAINS))
+   if (!_have_lid_and_external_screens_on())
      e_sys_action_do(E_SYS_SUSPEND, NULL);
 }
 
@@ -2523,8 +2522,7 @@ ACT_FN_GO(hibernate, )
 
 ACT_FN_GO(hibernate_smart, EINA_UNUSED)
 {
-   if ((!_have_lid_and_external_screens_on()) &&
-       (ecore_power_state_get() != ECORE_POWER_STATE_MAINS))
+   if (!_have_lid_and_external_screens_on())
      e_sys_action_do(E_SYS_HIBERNATE, NULL);
 }
 

-- 


Reply via email to