aboutsummaryrefslogtreecommitdiffstats
path: root/examples/moderate
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-04 12:34:23 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-04 12:34:23 +0100
commit26d536eb55d4fc847a8c83660fa0de7c4b077bf3 (patch)
tree2784bba8c245bbff957da41bed941e5ce917e987 /examples/moderate
parentfix threading issues in xmonad example (diff)
downloadxpybar-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 'examples/moderate')
-rw-r--r--examples/moderate5
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])