ref: 02f37359b09972ced1ed1061bd2a5a0aa65b2d09
parent: 8726990cf563f72d91e1cb8335510d5a1d38ec02
author: cinap_lenrek <[email protected]>
date: Tue Mar 15 14:32:05 EDT 2016
rio: remove more unneccesary flushimage() calls
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -820,7 +820,6 @@
break;
}
wsendctlmesg(w, Wakeup, ZR, nil);
- flushimage(display, 1);
}
Point
--- a/sys/src/cmd/rio/scrl.c
+++ b/sys/src/cmd/rio/scrl.c
@@ -133,7 +133,6 @@
oldp0 = ~0;
first = TRUE;
do{
- flushimage(display, 1);
my = w->mc.xy.y;
if(my < s.min.y)
my = s.min.y;
@@ -165,7 +164,8 @@
oldp0 = p0;
/* debounce */
if(first){
- flushimage(display, 1);
+ if(display->bufp > display->buf)
+ flushimage(display, 1);
if(but > 3)
return;
sleep(200);
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -432,7 +432,7 @@
freecompletion(cr);
break;
}
- if(w->i!=nil && Dx(w->screenr) > 0)
+ if(w->i!=nil && Dx(w->screenr) > 0 && display->bufp > display->buf)
flushimage(display, 1);
}
}
@@ -1126,8 +1126,8 @@
w->screenr = r;
strcpy(buf, w->name);
wresize(w, i);
- proccreate(deletetimeoutproc, estrdup(buf), 4096);
flushimage(display, 1);
+ proccreate(deletetimeoutproc, estrdup(buf), 4096);
if(Dx(r)<=0){ /* window got hidden, if we had the input, drop it */
if(w==input)
input = nil;