From bab6fb76b7e17ea7e8d9438f638c0de9da7aa61c Mon Sep 17 00:00:00 2001 From: Sahan Fernando Date: Thu, 24 Jun 2021 22:04:07 +1000 Subject: [PATCH] WindowServer: Redraw screen when switching back from tty --- Userland/Services/WindowServer/WindowManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index 2544551709..1df6316a58 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -1186,6 +1186,12 @@ void WindowManager::process_key_event(KeyEvent& event) return; } + // FIXME: This is fragile, the kernel should send a signal when we switch back to the WindowManager's framebuffer + if (event.type() == Event::KeyDown && (event.modifiers() & Mod_Alt) && (event.key() == Key_ExclamationPoint || event.key() == Key_1)) { + Compositor::the().invalidate_screen(); + return; + } + if (event.type() == Event::KeyDown && (event.modifiers() == (Mod_Ctrl | Mod_Super | Mod_Shift) && event.key() == Key_I)) { reload_icon_bitmaps_after_scale_change(); Compositor::the().invalidate_screen();