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:
parent
48b0150620
commit
37c2d30fb2
20
spiceterm.c
20
spiceterm.c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user