From fbcb69a855d4d750cedf7cacc9a86698bdbda488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 8 Sep 2020 15:45:50 +0200 Subject: [PATCH] Avoid not exiting on unlocked screen with constant keyboard activity --- afterlock/afterlock.go | 3 +++ 1 file changed, 3 insertions(+) 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