4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

* select.cc (peek_console): Don't report read_ready on mouse events unless we

are looking for mouse events.
* fhandler.h (fhandler_console::mouse_aware): New method.
This commit is contained in:
Christopher Faylor 2001-03-02 01:55:21 +00:00
parent 4124e827f2
commit d80999a1c4
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Thu Mar 1 20:48:11 2001 Christopher Faylor <cgf@cygnus.com>
* select.cc (peek_console): Don't report read_ready on mouse events
unless we are looking for mouse events.
* fhandler.h (fhandler_console::mouse_aware): New method.
Wed Feb 28 15:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc: Eliminate `#include <wchar.h>'.

View File

@ -680,6 +680,7 @@ public:
int ioctl (unsigned int cmd, void *);
void init (HANDLE, DWORD, mode_t);
bool mouse_aware () {return use_mouse;}
select_record *select_read (select_record *s);
select_record *select_write (select_record *s);

View File

@ -638,7 +638,10 @@ peek_console (select_record *me, int ignra)
else if (irec.EventType == MOUSE_EVENT &&
(irec.Event.MouseEvent.dwEventFlags == 0 ||
irec.Event.MouseEvent.dwEventFlags == DOUBLE_CLICK))
{
if (fh->mouse_aware ())
return me->read_ready = 1;
}
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 = 1;