mirror of
https://github.com/RGBCube/serenity
synced 2025-07-17 11:27:35 +00:00
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.
This commit is contained in:
parent
d84d81fc4e
commit
ec925cbb89
1 changed files with 3 additions and 2 deletions
|
@ -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
|
// if needed. This will ensure we clear the screen and also that WindowServer won't print anything
|
||||||
// in between.
|
// in between.
|
||||||
if (m_active_console->is_graphical() && !was_graphical) {
|
if (m_active_console->is_graphical() && !was_graphical) {
|
||||||
|
m_active_console->set_active(true);
|
||||||
GraphicsManagement::the().activate_graphical_mode();
|
GraphicsManagement::the().activate_graphical_mode();
|
||||||
}
|
return;
|
||||||
if (!m_active_console->is_graphical() && was_graphical) {
|
} else if (!m_active_console->is_graphical() && was_graphical) {
|
||||||
GraphicsManagement::the().deactivate_graphical_mode();
|
GraphicsManagement::the().deactivate_graphical_mode();
|
||||||
}
|
}
|
||||||
m_active_console->set_active(true);
|
m_active_console->set_active(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue