shithub: riscv

Download patch

ref: d56c586f75748b7ffc6ec12866bb9e722df859ab
parent: 21312484117fbebf8300841684b613a1b3a993fd
author: cinap_lenrek <[email protected]>
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");