home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae6a3d5
)
New client: Only redraw screen when content change can be assumed.
author
Christian Heller
<c.heller@plomlompom.de>
Sat, 7 Nov 2015 19:39:12 +0000
(20:39 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sat, 7 Nov 2015 19:39:12 +0000
(20:39 +0100)
client_prototype.py
patch
|
blob
|
history
diff --git
a/client_prototype.py
b/client_prototype.py
index b5c7f599cef90242632e84cfb5a174d150213d89..9a67b98d0e0ac54d72de916b5aa0ec6ef21d2dfe 100644
(file)
--- a/
client_prototype.py
+++ b/
client_prototype.py
@@
-79,6
+79,7
@@
def set_window_geometries():
for win in windows:
set_window_size()
place_window()
+ cursed_main.redraw = True
def draw_screen():
@@
-195,11
+196,14
@@
def cursed_main(stdscr):
while True:
stdscr.timeout(delay)
delay = delay * 2 if delay < 1000 else delay
- draw_screen()
+ if cursed_main.redraw:
+ draw_screen()
+ cursed_main.redraw = False
char = stdscr.getch()
if (char >= 0):
if chr(char) in commands:
commands[chr(char)]()
+ cursed_main.redraw = True
test_and_poll_server()