terminal: drain timer after wakeup

Use the new timer_drain() helper to reset the timer after waking up.
Otherwise, we get spurious warnings that the CPU is too slow.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-09-18 16:24:48 +02:00
parent d3a0358797
commit 2f7bb5a57f

View File

@ -135,8 +135,11 @@ static void schedule_redraw(struct kmscon_terminal *term)
if (!term->awake)
return;
if (!term->redraw)
if (!term->redraw) {
ev_timer_enable(term->redraw_timer);
ev_timer_drain(term->redraw_timer, NULL);
}
if (term->redraw < term->fps)
term->redraw = term->fps;
}