From: Eric Pouech eric.pouech@gmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- programs/conhost/conhost.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 769f998f404..bf46e6b1c18 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -2859,9 +2859,18 @@ static int main_loop( struct console *console, HANDLE signal ) return 0; }
+static void teardown( struct console *console ) +{ + if (console->is_unix) + { + set_tty_attr( console, empty_char_info.attr ); + tty_flush( console ); + } +} + int __cdecl wmain(int argc, WCHAR *argv[]) { - int headless = 0, i, width = 0, height = 0; + int headless = 0, i, width = 0, height = 0, ret; HANDLE signal = NULL; WCHAR *end;
@@ -2954,5 +2963,8 @@ int __cdecl wmain(int argc, WCHAR *argv[]) ShowWindow( console.win, (si.dwFlags & STARTF_USESHOWWINDOW) ? si.wShowWindow : SW_SHOW ); }
- return main_loop( &console, signal ); + ret = main_loop( &console, signal ); + teardown( &console ); + + return ret; }