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>2001-03-02 04:55:21 +0300
committerChristopher Faylor <me@cgf.cx>2001-03-02 04:55:21 +0300
commitd80999a1c4d99cf8aa9f1a61d992aefa57a7649a (patch)
tree0df67b691f318085d31e416b078219fa4663e829
parent4124e827f221f3d9869a7e53f4a3f47649b82361 (diff)
* 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.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler.h1
-rw-r--r--winsup/cygwin/select.cc5
3 files changed, 11 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4d3d2cffc..d7c02ee8f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>'.
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 99321a10e..3607b3b28 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -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);
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index b68161dc4..fe0804979 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -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))
- return me->read_ready = 1;
+ {
+ 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;