From b569b2df35d3f109520033ff10220cfb28f7db67 Mon Sep 17 00:00:00 2001 From: Sahan Fernando Date: Fri, 25 Jun 2021 22:57:09 +1000 Subject: Kernel: Don't clear VirtualConsoles when initializing Instead of calling clear() for each virtual console we initialize, we only call clear() when activating it from ConsoleManagement. --- Kernel/TTY/ConsoleManagement.cpp | 2 ++ Kernel/TTY/VirtualConsole.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Kernel/TTY/ConsoleManagement.cpp b/Kernel/TTY/ConsoleManagement.cpp index f768fca6a4..01dbb46aa5 100644 --- a/Kernel/TTY/ConsoleManagement.cpp +++ b/Kernel/TTY/ConsoleManagement.cpp @@ -61,6 +61,8 @@ UNMAP_AFTER_INIT void ConsoleManagement::initialize() m_active_console = m_consoles[tty_number]; ScopedSpinLock lock(m_lock); m_active_console->set_active(true); + if (!m_active_console->is_graphical()) + m_active_console->clear(); } void ConsoleManagement::switch_to(unsigned index) diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp index 7dfc4a66d2..08dde9b15c 100644 --- a/Kernel/TTY/VirtualConsole.cpp +++ b/Kernel/TTY/VirtualConsole.cpp @@ -126,7 +126,6 @@ UNMAP_AFTER_INIT void VirtualConsole::initialize() for (size_t row = 0; row < rows(); row++) { m_lines.append({ true, 0 }); } - clear(); VERIFY(m_cells); } -- cgit v1.2.3