1
Fork 0
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:
Andreas Kling 2019-10-22 21:57:53 +02:00
parent a6b153abf1
commit cd1eee6604
3 changed files with 52 additions and 23 deletions

View file

@ -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