diff options
author | Simon Effenberg <savar@schuldeigen.de> | 2014-12-23 12:01:31 +0100 |
---|---|---|
committer | Simon Effenberg <savar@schuldeigen.de> | 2014-12-23 12:01:31 +0100 |
commit | d987897c0b37d1f08610fe1e970cfe24b89442f0 (patch) | |
tree | ae4ced44dd663694846a846ccf5188d0bb0b4deb | |
parent | d5dee1632dd6e68a616a748456a880ea05983b3e (diff) | |
download | profani-tty-d987897c0b37d1f08610fe1e970cfe24b89442f0.tar.gz |
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.
-rw-r--r-- | src/ui/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |