1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 23:57:43 +00:00

Support resizing the Terminal app.

I set it up so that TIOCSWINSZ on a master PTY gets forwarded to the slave.
This feels intuitively right. Terminal can then use that to inform the shell
or whoever is inside the slave that the window size has changed.

TIOCSWINSZ also triggers the generation of a SIGWINCH signal. :^)
This commit is contained in:
Andreas Kling 2019-02-20 23:32:33 +01:00
parent 0ca3112301
commit 0aaec6b19a
6 changed files with 74 additions and 19 deletions

View file

@ -26,6 +26,7 @@ private:
virtual bool can_write(Process&) const override;
virtual void close() override;
virtual bool is_master_pty() const override { return true; }
virtual int ioctl(Process&, unsigned request, unsigned arg) override;
virtual const char* class_name() const override { return "MasterPTY"; }
RetainPtr<SlavePTY> m_slave;