2
0
mirror of git://git.proxmox.com/git/spiceterm.git synced 2025-08-22 10:17:06 +00:00

avoid call to refresh

This commit is contained in:
Dietmar Maurer 2013-10-09 09:30:56 +02:00
parent 48b0150620
commit 37c2d30fb2

View File

@ -206,15 +206,23 @@ spiceterm_refresh(spiceTerm *vt)
void
spiceterm_unselect_all(spiceTerm *vt)
{
int i;
int x, y, y1;
for (i = 0; i < vt->width*vt->total_height; i++) {
if (vt->cells[i].attrib.selected) {
vt->cells[i].attrib.selected = 0;
y1 = vt->y_displ;
for(y = 0; y < vt->total_height; y++) {
TextCell *c = vt->cells + y1 * vt->width;
for(x = 0; x < vt->width; x++) {
if (c->attrib.selected) {
c->attrib.selected = 0;
if (y < vt->height) {
draw_char_at(vt, x, y, c->ch, c->attrib);
}
}
spiceterm_refresh(vt);
c++;
}
if (++y1 == vt->total_height)
y1 = 0;
}
}
static void