diff --git a/afterlock/afterlock.go b/afterlock/afterlock.go index d18a826..534dfa5 100644 --- a/afterlock/afterlock.go +++ b/afterlock/afterlock.go @@ -94,6 +94,9 @@ func (af *AfterLock) hybernateDisplayLoop() { for { time.Sleep(time.Duration(af.LoopDelay) * time.Second) + if !af.screenLocked() { + return + } if af.keypressFlag.Get() { af.keypressFlag.Set(false) continue