From d987897c0b37d1f08610fe1e970cfe24b89442f0 Mon Sep 17 00:00:00 2001 From: Simon Effenberg Date: Tue, 23 Dec 2014 12:01:31 +0100 Subject: fix idle calculation if not using LIBXSS the inp_get_char was never returning ERR even without getting any input so the idle timeout stuff was wasting CPU and wasn't working if LIBXSS wasn't used. --- src/ui/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/core.c b/src/ui/core.c index f72ec732..4757547f 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -178,7 +178,7 @@ static wint_t _ui_get_char(char *input, int *size, int *result) { wint_t ch = inp_get_char(input, size, result); - if (ch != ERR) { + if (ch != ERR && *result != ERR) { ui_reset_idle_time(); } return ch; -- cgit 1.4.1-2-gfad0