* fhandler_console.cc (read): Add support for xterm-style mouse event

reporting.
(fhandler_console::char_command): Honor mouse events.
(fhandler_console::open): Enable mouse input events.
(fhandler_console::input_tcsetattr): Ditto.
* select.cc (peek_console): Add check for mouse events.
This commit is contained in:
Christopher Faylor
2000-12-16 03:11:02 +00:00
parent 7fbcbc9592
commit 085ec17c5d
3 changed files with 159 additions and 38 deletions

View File

@@ -635,6 +635,10 @@ peek_console (select_record *me, int ignra)
{
if (irec.EventType == WINDOW_BUFFER_SIZE_EVENT)
kill_pgrp (fh->tc->getpgid (), SIGWINCH);
else if (irec.EventType == MOUSE_EVENT &&
(irec.Event.MouseEvent.dwEventFlags == 0 ||
irec.Event.MouseEvent.dwEventFlags == DOUBLE_CLICK))
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;