git: 9front

Download patch

ref: 0a698326b540f478c1c05b304236f3f7a41ed661
parent: c1dd7b0094702a1055781a2a1e89d69b8539818f
author: cinap_lenrek <cinap_lenrek@rei2.9hal>
date: Sat Dec 24 22:57:46 EST 2011

mothra: flushdisplay before reading event

--- a/sys/src/cmd/mothra/mothra.c
+++ b/sys/src/cmd/mothra/mothra.c
@@ -360,6 +360,7 @@
 			}
 		}
 
+		flushimage(display, 1);
 		unlockdisplay(display);
 		i=event(&e);
 		lockdisplay(display);
@@ -740,7 +741,6 @@
 }
 
 void filter(char *cmd, int fd){
-	flushimage(display, 1);
 	switch(rfork(RFFDG|RFPROC|RFMEM|RFNOWAIT)){
 	case -1:
 		message("Can't fork!");
@@ -755,7 +755,6 @@
 	close(fd);
 }
 void gettext(Www *w, int fd, int type){
-	flushimage(display, 1);
 	switch(rfork(RFFDG|RFPROC|RFMEM|RFNOWAIT)){
 	case -1:
 		message("Can't fork, please wait");
--