diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2014-06-16 15:04:08 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2014-06-16 15:04:08 +0200 |
commit | 0117308ab5509a5c31b7778f9551f7335c553f77 (patch) | |
tree | f593cb6ced9ce3e7e246545f5db8e7410de28e0e /src/main.c | |
parent | 8cc95de0834c5217b080ad25907501f5ad152f6e (diff) | |
download | pianobar-0117308ab5509a5c31b7778f9551f7335c553f77.tar.gz pianobar-0117308ab5509a5c31b7778f9551f7335c553f77.tar.bz2 pianobar-0117308ab5509a5c31b7778f9551f7335c553f77.zip |
Re-init terminal when awaking from ^Z
And simplify code that nobody touched in a long long timeā¦ Fixes input
issues reported in #458.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -414,15 +414,11 @@ static void BarMainLoop (BarApp_t *app) { int main (int argc, char **argv) { static BarApp_t app; - /* terminal attributes _before_ we started messing around with ~ECHO */ - struct termios termOrig; memset (&app, 0, sizeof (app)); /* save terminal attributes, before disabling echoing */ - BarTermSave (&termOrig); - BarTermSetEcho (0); - BarTermSetBuffer (0); + BarTermInit (); /* signals */ signal (SIGPIPE, SIG_IGN); @@ -506,7 +502,7 @@ int main (int argc, char **argv) { BarSettingsDestroy (&app.settings); /* restore terminal attributes, zsh doesn't need this, bash does... */ - BarTermRestore (&termOrig); + BarTermRestore (); return 0; } |