From 0664bce5fdcb99196106b5a35872536f3206dddb Mon Sep 17 00:00:00 2001 From: Charlie Brej Date: Wed, 31 Mar 2010 19:16:36 +0100 Subject: [PATCH] [terminal] Do not discard the input when turning the terminal unbuffered Drawing to renderers was resetting the terminal to unbuffered, but this was also discarding any queued input keys. The fix should keep the input buffer untouched. --- src/libply-splash-core/ply-terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libply-splash-core/ply-terminal.c b/src/libply-splash-core/ply-terminal.c index ac49be8d..3e90dec5 100644 --- a/src/libply-splash-core/ply-terminal.c +++ b/src/libply-splash-core/ply-terminal.c @@ -182,7 +182,7 @@ ply_terminal_set_unbuffered_input (ply_terminal_t *terminal) /* Make \n return go to the beginning of the next line */ term_attributes.c_oflag |= ONLCR; - if (tcsetattr (terminal->fd, TCSAFLUSH, &term_attributes) != 0) + if (tcsetattr (terminal->fd, TCSANOW, &term_attributes) != 0) return false; terminal->is_unbuffered = true;