about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSimon Effenberg <savar@schuldeigen.de>2014-12-23 12:01:31 +0100
committerSimon Effenberg <savar@schuldeigen.de>2014-12-23 12:01:31 +0100
commitd987897c0b37d1f08610fe1e970cfe24b89442f0 (patch)
treeae4ced44dd663694846a846ccf5188d0bb0b4deb
parentd5dee1632dd6e68a616a748456a880ea05983b3e (diff)
downloadprofani-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.c2
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;