terminal session: propagate resize events

The new 'Terminal_session::size_changed_sigh' RPC function registers a
signal handler that is triggered each time when the terminal size
changes. It enables the client to adjust itself to the new size by
subsequently calling the 'size' RPC function. Of all terminal servers,
only the graphical terminal triggers this signal.
This commit is contained in:
Norman Feske
2018-02-07 17:03:19 +01:00
parent 96a068f90a
commit 8aa1e349fc
12 changed files with 134 additions and 66 deletions

View File

@ -111,9 +111,9 @@ class Terminal::Session_component : public Rpc_object<Session, Session_component
** Terminal session interface **
********************************/
Size size() { return Size(0, 0); }
Size size() override { return Size(0, 0); }
bool avail() { return false; }
bool avail() override { return false; }
size_t _read(size_t) { return 0; }
@ -134,7 +134,9 @@ class Terminal::Session_component : public Rpc_object<Session, Session_component
Dataspace_capability _dataspace() { return _io_buffer.cap(); }
void read_avail_sigh(Signal_context_capability) { }
void read_avail_sigh(Signal_context_capability) override { }
void size_changed_sigh(Signal_context_capability) override { }
void connected_sigh(Signal_context_capability sigh)
{
@ -146,8 +148,8 @@ class Terminal::Session_component : public Rpc_object<Session, Session_component
Signal_transmitter(sigh).submit();
}
size_t read(void *, size_t) { return 0; }
size_t write(void const *, size_t) { return 0; }
size_t read(void *, size_t) override { return 0; }
size_t write(void const *, size_t) override { return 0; }
};