diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-04 12:34:23 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-04 12:34:23 +0100 |
commit | 26d536eb55d4fc847a8c83660fa0de7c4b077bf3 (patch) | |
tree | 2784bba8c245bbff957da41bed941e5ce917e987 /examples/moderate | |
parent | fix threading issues in xmonad example (diff) | |
download | xpybar-26d536eb55d4fc847a8c83660fa0de7c4b077bf3.tar.gz xpybar-26d536eb55d4fc847a8c83660fa0de7c4b077bf3.tar.bz2 xpybar-26d536eb55d4fc847a8c83660fa0de7c4b077bf3.tar.xz |
add Bar.invalidate
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | examples/moderate | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/moderate b/examples/moderate index d47c704..1ab25e6 100644 --- a/examples/moderate +++ b/examples/moderate @@ -220,10 +220,7 @@ pattern = [ '%s │ %.2f │ %s │ %s │ %s │ %s }{ %s │ %s │ %s │ %s' start_ = start def start(): start_() - def refresh(): - if redraw(): - get_display().flush() - async(lambda : clock_.continuous_sync(refresh)) + async(lambda : clock_.continuous_sync(lambda : bar.invalidate())) HEIGHT = len(pattern) * 12 pattern = '\n'.join([p.replace('}{', '\0') for p in pattern]) |