summaryrefslogtreecommitdiff
path: root/sys/src/cmd
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-03-15 18:32:05 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-03-15 18:32:05 +0100
commit02f37359b09972ced1ed1061bd2a5a0aa65b2d09 (patch)
treec63d26b50a4f67841539e083f4c1fb86fa5a16a2 /sys/src/cmd
parent8726990cf563f72d91e1cb8335510d5a1d38ec02 (diff)
rio: remove more unneccesary flushimage() calls
Diffstat (limited to 'sys/src/cmd')
-rw-r--r--sys/src/cmd/rio/rio.c1
-rw-r--r--sys/src/cmd/rio/scrl.c4
-rw-r--r--sys/src/cmd/rio/wind.c4
3 files changed, 4 insertions, 5 deletions
diff --git a/sys/src/cmd/rio/rio.c b/sys/src/cmd/rio/rio.c
index 2abcb7223..5c99afd45 100644
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -820,7 +820,6 @@ button2menu(Window *w)
break;
}
wsendctlmesg(w, Wakeup, ZR, nil);
- flushimage(display, 1);
}
Point
diff --git a/sys/src/cmd/rio/scrl.c b/sys/src/cmd/rio/scrl.c
index c8e6acf7c..86263cbe6 100644
--- a/sys/src/cmd/rio/scrl.c
+++ b/sys/src/cmd/rio/scrl.c
@@ -133,7 +133,6 @@ wscroll(Window *w, int but)
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 @@ wscroll(Window *w, int but)
oldp0 = p0;
/* debounce */
if(first){
- flushimage(display, 1);
+ if(display->bufp > display->buf)
+ flushimage(display, 1);
if(but > 3)
return;
sleep(200);
diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c
index 6bf3fe90b..026e67927 100644
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -432,7 +432,7 @@ winctl(void *arg)
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 @@ wctlmesg(Window *w, int m, Rectangle r, void *p)
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;