diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-08 00:44:33 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-08 00:44:33 +0100 |
commit | 10d3024a6af956bf8cd7dc61a5e41864b6fbc4f6 (patch) | |
tree | 2885db0d3e1fbe0213156717c29803ad6ed18860 /termkey.c | |
parent | ac6cae29bb1384fa5afb7dbe16c556328b880b6a (diff) | |
download | termo-10d3024a6af956bf8cd7dc61a5e41864b6fbc4f6.tar.gz termo-10d3024a6af956bf8cd7dc61a5e41864b6fbc4f6.tar.xz termo-10d3024a6af956bf8cd7dc61a5e41864b6fbc4f6.zip |
Pass an explicit 'force' parameter into driver's getkey rather than relying on non-zero waittime
Diffstat (limited to 'termkey.c')
-rw-r--r-- | termkey.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -363,19 +363,12 @@ static termkey_result getkey_simple(termkey_t *tk, termkey_key *key) termkey_result termkey_getkey(termkey_t *tk, termkey_key *key) { - return (*tk->driver.getkey)(tk, key); + return (*tk->driver.getkey)(tk, key, 0); } termkey_result termkey_getkey_force(termkey_t *tk, termkey_key *key) { - int old_waittime = tk->waittime; - tk->waittime = 0; - - termkey_result ret = termkey_getkey(tk, key); - - tk->waittime = old_waittime; - - return ret; + return (*tk->driver.getkey)(tk, key, 1); } termkey_result termkey_waitkey(termkey_t *tk, termkey_key *key) |