diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-05-24 09:36:41 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-24 11:27:58 +0200 |
commit | 875a2cbb7150b036af343364a8bf2d07a97dd03d (patch) | |
tree | d87934aaf9c68fcb188b5bdd541ab3cf4ef8ccf5 /Kernel/TTY | |
parent | 7dfc804d7d749203974fde1687b9c9c4d6442cea (diff) | |
download | serenity-875a2cbb7150b036af343364a8bf2d07a97dd03d.zip |
LibVT+Kernel: Add support for setting cursor styles
This commit introduces support for 3 new escape sequences:
1. Stop blinking cursor mode
2. `DECTCEM` mode (enable/disable cursor)
3. `DECSCUSR` (set cursor style)
`TerminalWidget` now supports the following cursor types: block,
underline and vertical bar. Each of these can blink or be steady.
`VirtualConsole` ignores these (just as we were doing before).
Diffstat (limited to 'Kernel/TTY')
-rw-r--r-- | Kernel/TTY/VirtualConsole.cpp | 5 | ||||
-rw-r--r-- | Kernel/TTY/VirtualConsole.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp index 077b6928e5..feaec5ad4f 100644 --- a/Kernel/TTY/VirtualConsole.cpp +++ b/Kernel/TTY/VirtualConsole.cpp @@ -387,6 +387,11 @@ void VirtualConsole::emit(const u8* data, size_t size) TTY::emit(data[i], true); } +void VirtualConsole::set_cursor_style(VT::CursorStyle) +{ + // Do nothing +} + String VirtualConsole::device_name() const { return String::formatted("tty{}", minor()); diff --git a/Kernel/TTY/VirtualConsole.h b/Kernel/TTY/VirtualConsole.h index d0c1c7175b..455a5bc2b3 100644 --- a/Kernel/TTY/VirtualConsole.h +++ b/Kernel/TTY/VirtualConsole.h @@ -106,6 +106,7 @@ private: virtual void terminal_did_resize(u16 columns, u16 rows) override; virtual void terminal_history_changed() override; virtual void emit(const u8*, size_t) override; + virtual void set_cursor_style(VT::CursorStyle) override; // ^CharacterDevice virtual const char* class_name() const override { return "VirtualConsole"; } |