From: Charlie Brej Date: Wed, 31 Mar 2010 18:16:36 +0000 (+0100) Subject: [terminal] Do not discard the input when turning the terminal unbuffered X-Git-Tag: 0.8.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0664bce5fdcb99196106b5a35872536f3206dddb;p=thirdparty%2Fplymouth.git [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. --- 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;