fix: lock screen wake window no longer extends on repeated key presses

Previously every key press while locked reset _lock_wake_until to now+5s,
so multiple presses (or spurious button events) kept extending the window.
Now the 5s timer is set only when the display first wakes from dark.
The unlock sequence still extends the window on each Back+Enter step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-17 14:30:53 +02:00
parent b2c7e249a6
commit 073b98f535

View File

@@ -1297,10 +1297,7 @@ void UITask::loop() {
{ uint32_t aoff = autoOffMillis(); if (aoff > 0) _auto_off = millis() + aoff; } // extend auto-off timer
_next_refresh = 100; // trigger refresh
} else if (_locked) {
// Locked: eat all keys (unlock sequence handled at button-event level above)
// Any key extends the wake window if display is already on
if (_display != NULL && _display->isOn())
_lock_wake_until = millis() + 5000;
// Locked: eat all keys — wake window is set only when display first turns on
_next_refresh = 0;
}
}