mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
noux: respond to terminal-close event
This commit is contained in:
committed by
Christian Helmuth
parent
78c09c27ca
commit
44a6e51114
@@ -35,6 +35,8 @@ struct Noux::Terminal_io_channel : Io_channel
|
||||
|
||||
Signal_handler<Terminal_io_channel> _resize_handler;
|
||||
|
||||
enum { EOF = 4 };
|
||||
|
||||
bool eof = false;
|
||||
|
||||
enum Type { STDIN, STDOUT, STDERR } type;
|
||||
@@ -102,8 +104,6 @@ struct Noux::Terminal_io_channel : Io_channel
|
||||
|
||||
char c = read_buffer.get();
|
||||
|
||||
enum { EOF = 4 };
|
||||
|
||||
if (c == EOF) {
|
||||
|
||||
/*
|
||||
@@ -225,6 +225,11 @@ struct Noux::Terminal_io_channel : Io_channel
|
||||
|
||||
void _handle_resize()
|
||||
{
|
||||
/* respond to terminal-close event */
|
||||
Terminal::Session::Size const size = _terminal.size();
|
||||
if (_terminal.size().columns()*_terminal.size().lines() == 0)
|
||||
read_buffer.add(EOF);
|
||||
|
||||
Io_channel::invoke_all_interrupt_handlers(Sysio::SIG_WINCH);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user