mothra: avoid flushimage() calls, event() will implicitely flush
This commit is contained in:
parent
3145ca7d78
commit
e5dc3ade08
6 changed files with 5 additions and 9 deletions
|
@ -254,7 +254,6 @@ void pl_draw1(Panel *p, Image *b){
|
|||
}
|
||||
void pldraw(Panel *p, Image *b){
|
||||
pl_draw1(p, b);
|
||||
flushimage(display, 1);
|
||||
}
|
||||
void pl_invis(Panel *p, int v){
|
||||
for(;p;p=p->next){
|
||||
|
|
|
@ -73,6 +73,8 @@ int pl_hitentry(Panel *p, Mouse *m){
|
|||
while(m->buttons&1){
|
||||
int old;
|
||||
old=m->buttons;
|
||||
if(display->bufp > display->buf)
|
||||
flushimage(display, 1);
|
||||
*m=emouse();
|
||||
if((old&7)==1){
|
||||
if((m->buttons&7)==3){
|
||||
|
|
|
@ -9,10 +9,8 @@ void plgrabkb(Panel *g){
|
|||
plkbfocus=g;
|
||||
}
|
||||
void plkeyboard(Rune c){
|
||||
if(plkbfocus){
|
||||
if(plkbfocus)
|
||||
plkbfocus->type(plkbfocus, c);
|
||||
flushimage(display, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -47,5 +45,4 @@ void plmouse(Panel *g, Mouse *m){
|
|||
g->flags&=~REMOUSE;
|
||||
g->lastmouse=hit;
|
||||
}
|
||||
flushimage(display, 1);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,6 @@ int pl_hitpopup(Panel *g, Mouse *m){
|
|||
if(g->state!=DOWN){
|
||||
if(pp->save!=0){
|
||||
draw(g->b, p->r, pp->save, 0, p->r.min);
|
||||
flushimage(display, 1);
|
||||
freeimage(pp->save);
|
||||
pp->save=0;
|
||||
}
|
||||
|
|
|
@ -224,6 +224,7 @@ void twselect(Textwin *t, Mouse *m){
|
|||
p1=addpt(p0, Pt(1, 0));
|
||||
twhilite(t, sel0, sel1, 1);
|
||||
for(;;){
|
||||
if(display->bufp > display->buf)
|
||||
flushimage(display, 1);
|
||||
*m=emouse();
|
||||
if((m->buttons&7)!=1) break;
|
||||
|
|
|
@ -381,7 +381,6 @@ void main(int argc, char *argv[]){
|
|||
}
|
||||
}
|
||||
|
||||
flushimage(display, 1);
|
||||
drawlock(0);
|
||||
i=event(&e);
|
||||
drawlock(1);
|
||||
|
@ -545,7 +544,6 @@ void scrollto(char *tag){
|
|||
}
|
||||
}
|
||||
plsetpostextview(text, current->yoffs);
|
||||
flushimage(display, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue