Fix clock & bigclock not updating without input

Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
AnErrupTion 2024-07-29 14:18:23 +02:00
parent c1f1c8f5c1
commit f646dddd02
No known key found for this signature in database
GPG Key ID: 3E85EB44F610AD7F
1 changed files with 2 additions and 2 deletions

View File

@ -466,8 +466,6 @@ pub fn main() !void {
desktop.draw();
login.draw();
password.drawMasked(config.asterisk);
update = animate;
} else {
std.time.sleep(std.time.ns_per_ms * 10);
update = buffer.cascade();
@ -500,6 +498,8 @@ pub fn main() !void {
const event_error = if (timeout == -1) termbox.tb_poll_event(&event) else termbox.tb_peek_event(&event, timeout);
update = timeout != -1;
if (event_error < 0 or event.type != termbox.TB_EVENT_KEY) continue;
switch (event.key) {