mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-28 03:27:46 +08:00
* fhandler_console.cc (fhandler_console::open): Set console state last.
Only add ENABLE_PROCESSED_INPUT flag if this is the first time we open the console.
This commit is contained in:
parent
2ed056f092
commit
cdab7783c4
@ -1,3 +1,9 @@
|
||||
2008-06-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_console.cc (fhandler_console::open): Set console state last.
|
||||
Only add ENABLE_PROCESSED_INPUT flag if this is the first time we open
|
||||
the console.
|
||||
|
||||
2008-04-17 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* dtable.cc (dtable::init_std_file_from_handle): Fix pipe related test.
|
||||
|
@ -682,16 +682,19 @@ fhandler_console::open (int flags, mode_t)
|
||||
dev_state->set_default_attr ();
|
||||
}
|
||||
|
||||
tc->rstcons (false);
|
||||
set_open_status ();
|
||||
int cons_cnt = cygheap->manage_console_count ("fhandler_console::open", 1);
|
||||
|
||||
DWORD cflags;
|
||||
if (GetConsoleMode (get_io_handle (), &cflags))
|
||||
{
|
||||
cflags |= ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode (get_io_handle (), ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT | cflags);
|
||||
if (cons_cnt <= 1)
|
||||
cflags |= ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode (get_io_handle (),
|
||||
ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT | cflags);
|
||||
}
|
||||
|
||||
tc->rstcons (false);
|
||||
set_open_status ();
|
||||
cygheap->manage_console_count ("fhandler_console::open", 1);
|
||||
debug_printf ("opened conin$ %p, conout$ %p", get_io_handle (),
|
||||
get_output_handle ());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user