From 2f7bb5a57f97bb3d3c59b74013fd5eedbfcdb3d6 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 18 Sep 2012 16:24:48 +0200 Subject: [PATCH] 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 --- src/terminal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/terminal.c b/src/terminal.c index 2a9f844..3d6f246 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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; }