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
|
void
|
||||||
spiceterm_unselect_all(spiceTerm *vt)
|
spiceterm_unselect_all(spiceTerm *vt)
|
||||||
{
|
{
|
||||||
int i;
|
int x, y, y1;
|
||||||
|
|
||||||
for (i = 0; i < vt->width*vt->total_height; i++) {
|
y1 = vt->y_displ;
|
||||||
if (vt->cells[i].attrib.selected) {
|
for(y = 0; y < vt->total_height; y++) {
|
||||||
vt->cells[i].attrib.selected = 0;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
c++;
|
||||||
}
|
}
|
||||||
|
if (++y1 == vt->total_height)
|
||||||
|
y1 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
spiceterm_refresh(vt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user