summaryrefslogtreecommitdiff
path: root/sys/src/games/catclock.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-08-12 00:08:51 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-08-12 00:08:51 +0200
commit762093d2125c0f6efffd55697e6b580dd607ccf3 (patch)
tree791926b7e057d282f96c640caf55d3ac7e133641 /sys/src/games/catclock.c
parent883ded7b49fc9775d5bca5cb03dcec6d006dc92d (diff)
games/juggle, games/catclock: keep up with queued mouse events
many queued mouse events delay eresize() because new ebread() takes from the queue first before attempting to read from the event pipe. this is a waste of memory, so just process (dequeue) all the events as long as there are any on each iteration.
Diffstat (limited to 'sys/src/games/catclock.c')
-rw-r--r--sys/src/games/catclock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/games/catclock.c b/sys/src/games/catclock.c
index a581bc54d..01faba297 100644
--- a/sys/src/games/catclock.c
+++ b/sys/src/games/catclock.c
@@ -118,7 +118,7 @@ void main(int argc, char *argv[]){
eye[i]=draweye(i*PI/NTAIL);
}
for(;;){
- if(ecanmouse()) emouse(); /* don't get resize events without this! */
+ while(ecanmouse()) emouse(); /* don't get resize events without this! */
drawclock();
flushimage(display, 1);
// bflush();