summaryrefslogtreecommitdiff
path: root/Kernel/TTY
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-05-13 09:54:49 +0300
committerLinus Groh <mail@linusgroh.de>2022-06-06 20:11:05 +0100
commitec925cbb8991157509acfe2e64ab13f68b6f77af (patch)
treef6c20c9ebbefaac647e9d9b6739abf2e3c69a616 /Kernel/TTY
parentd84d81fc4eb8a368c1ff13afd26ae75731608728 (diff)
downloadserenity-ec925cbb8991157509acfe2e64ab13f68b6f77af.zip
Kernel: Set console active before try to enable graphical mode
We should first enable the VirtualConsole and then enable graphical mode, to ensure proper display output on the switched-to virtual console that has been chosen. When de-activating graphical mode, we do the de-activating first then enable the VirtualConsole to ensure proper text output on screen.
Diffstat (limited to 'Kernel/TTY')
-rw-r--r--Kernel/TTY/ConsoleManagement.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Kernel/TTY/ConsoleManagement.cpp b/Kernel/TTY/ConsoleManagement.cpp
index 690e0b14b1..752d471986 100644
--- a/Kernel/TTY/ConsoleManagement.cpp
+++ b/Kernel/TTY/ConsoleManagement.cpp
@@ -84,9 +84,10 @@ void ConsoleManagement::switch_to(unsigned index)
// if needed. This will ensure we clear the screen and also that WindowServer won't print anything
// in between.
if (m_active_console->is_graphical() && !was_graphical) {
+ m_active_console->set_active(true);
GraphicsManagement::the().activate_graphical_mode();
- }
- if (!m_active_console->is_graphical() && was_graphical) {
+ return;
+ } else if (!m_active_console->is_graphical() && was_graphical) {
GraphicsManagement::the().deactivate_graphical_mode();
}
m_active_console->set_active(true);