mouse: fix cursor redraw to prevent screen blanking (thanks erik)

This commit is contained in:
cinap_lenrek 2013-04-16 18:52:49 +02:00
parent c31c4ca7b3
commit 4fcc5efce5

View file

@ -517,6 +517,9 @@ shouldredraw(void*)
static void
mouseproc(void*)
{
ulong counter;
counter = ~0;
while(waserror())
;
for(;;){
@ -524,10 +527,11 @@ mouseproc(void*)
mouse.redraw = 0;
cursoroff();
cursoron();
drawactive(1);
} else {
drawactive(0);
}
drawactive(mouse.counter != counter);
counter = mouse.counter;
tsleep(&mouse.redrawr, shouldredraw, 0, 20*1000);
}
}