summaryrefslogtreecommitdiff
path: root/wasp
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-22 09:27:14 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-22 09:27:14 (GMT)
commitbfa715b488554671fe2cd1dbc3a99acd25a9d167 (patch)
tree999593a73e31531f9e08306f903aa99079f3faba /wasp
parent748e5fe65ad9bfb0809953fcb34558be05788587 (diff)
widgets: clock: Improve the redraw logic
Currently if we wake the watch exactly N hours (where N is integer) after it goes to sleep then the time will not be updated. Fix this the obvious way. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp')
-rw-r--r--wasp/widgets.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wasp/widgets.py b/wasp/widgets.py
index 7fc4988..f064c69 100644
--- a/wasp/widgets.py
+++ b/wasp/widgets.py
@@ -102,7 +102,8 @@ class Clock:
if on_screen and on_screen == now:
return None
- if self.enabled and (not on_screen or now[4] != on_screen[4]):
+ if self.enabled and (not on_screen
+ or now[4] != on_screen[4] or now[3] != on_screen[3]):
t1 = '{:02}:{:02}'.format(now[3], now[4])
draw = wasp.watch.drawable