sxmo_hook_screenoff.sh respect idle inhibitors

Previously, this hook was just removing the wake lock that prevent the
device to suspend. This was only up to sxmo_hook_block_suspend.sh to
prevent the device to suspend if some applications are active.

With this change, we glue the idle inhibitors just before unlocking the wake
lock.

It means that the user now can move the device to screenoff, with an
idle inhibitor programs running, without needing to add a dedicated rule
to the block_suspends hook.

This also remove the need of this sxmo_hold_a_bit 3s wakelock.
This commit is contained in:
Willow Barraco
2023-10-09 08:41:32 +02:00
parent 37b50b6798
commit 86555424ed

View File

@@ -36,5 +36,6 @@ esac
wait
sxmo_wakelock.sh lock sxmo_hold_a_bit 3s # avoid immediate suspension
sxmo_wakelock.sh unlock sxmo_not_screenoff
sxmo_daemons.sh start idle_locker sxmo_idle.sh -w \
timeout 3 'sxmo_wakelock.sh unlock sxmo_not_screenoff' \
resume 'sxmo_wakelock.sh lock sxmo_not_screenoff infinite'