forked from enlightenment/enlightenment
e - actions - smart suspend/hibernate - also dont do when on mains power
This commit is contained in:
parent
e60889981e
commit
7faf6666e5
|
@ -2393,7 +2393,8 @@ _have_lid_and_external_screens_on(void)
|
|||
|
||||
ACT_FN_GO(suspend_smart, __UNUSED__)
|
||||
{
|
||||
if (!_have_lid_and_external_screens_on())
|
||||
if ((!_have_lid_and_external_screens_on()) &&
|
||||
(ecore_power_state_get() != ECORE_POWER_STATE_MAINS))
|
||||
e_sys_action_do(E_SYS_SUSPEND, NULL);
|
||||
}
|
||||
|
||||
|
@ -2461,7 +2462,8 @@ ACT_FN_GO(hibernate, )
|
|||
|
||||
ACT_FN_GO(hibernate_smart, __UNUSED__)
|
||||
{
|
||||
if (!_have_lid_and_external_screens_on())
|
||||
if ((!_have_lid_and_external_screens_on()) &&
|
||||
(ecore_power_state_get() != ECORE_POWER_STATE_MAINS))
|
||||
e_sys_action_do(E_SYS_HIBERNATE, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue