Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-08-19 08:43:58 +0400
committerChristopher Faylor <me@cgf.cx>2002-08-19 08:43:58 +0400
commitc060edba342decad9f5e29837a04cf82ff61b7a0 (patch)
tree243725d46a0926fd8c6243363cde0e3c173d0bdf /winsup/cygwin/select.cc
parenta94b60cea46803ad239495fe0fe3fbcc13766b81 (diff)
* fhandler.h (fhandler_console::send_winch_maybe): New method.
* fhandler_console.cc (set_console_state_for_spawn): Remove if 0'ed code. (fhandler_console::send_winch_maybe): Define new method. (fhandler_console::read): Use send_winch_maybe where appropriate. (fhandler_console::init): Just call all tcsetattr rather than output_tcsetattr. * select.cc (peek_console): Reorganize so that send_winch_maybe is called for everything but keyboard input.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 97674a92f..c3c4158a4 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -661,18 +661,22 @@ peek_console (select_record *me, bool)
break;
else
{
- if (irec.EventType == WINDOW_BUFFER_SIZE_EVENT)
- fh->tc->kill_pgrp (SIGWINCH);
- else if (irec.EventType == MOUSE_EVENT &&
- (irec.Event.MouseEvent.dwEventFlags == 0 ||
- irec.Event.MouseEvent.dwEventFlags == DOUBLE_CLICK))
+ if (irec.EventType == KEY_EVENT)
{
- if (fh->mouse_aware ())
+ if (irec.Event.KeyEvent.bKeyDown
+ && (irec.Event.KeyEvent.uChar.AsciiChar
+ || get_nonascii_key (irec, tmpbuf)))
return me->read_ready = true;
}
- else if (irec.EventType == KEY_EVENT && irec.Event.KeyEvent.bKeyDown == true &&
- (irec.Event.KeyEvent.uChar.AsciiChar || get_nonascii_key (irec, tmpbuf)))
- return me->read_ready = true;
+ else
+ {
+ fh->send_winch_maybe ();
+ if (irec.EventType == MOUSE_EVENT
+ && fh->mouse_aware ()
+ && (irec.Event.MouseEvent.dwEventFlags == 0
+ || irec.Event.MouseEvent.dwEventFlags == DOUBLE_CLICK))
+ return me->read_ready = true;
+ }
/* Read and discard the event */
ReadConsoleInput (h, &irec, 1, &events_read);