mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +00:00
LibVT+Terminal: Give TerminalWidget a hook for EOF on the pty
Instead of quitting the application immediately when the pty gives an EOF, fire an on_command_exit hook so the TerminalWidget client can decide for himself what to do.
This commit is contained in:
parent
a6b153abf1
commit
cd1eee6604
3 changed files with 52 additions and 23 deletions
|
@ -18,6 +18,8 @@ public:
|
|||
TerminalWidget(int ptm_fd, bool automatic_size_policy, RefPtr<CConfigFile> config);
|
||||
virtual ~TerminalWidget() override;
|
||||
|
||||
void set_pty_master_fd(int fd);
|
||||
|
||||
void create_window();
|
||||
|
||||
void flush_dirty_lines();
|
||||
|
@ -44,6 +46,7 @@ public:
|
|||
virtual bool accepts_focus() const override { return true; }
|
||||
|
||||
Function<void(const StringView&)> on_title_change;
|
||||
Function<void()> on_command_exit;
|
||||
|
||||
private:
|
||||
// ^GWidget
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue