Selaa lähdekoodia

WindowServer: Redraw screen when switching back from tty

Sahan Fernando 4 vuotta sitten
vanhempi
commit
bab6fb76b7
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 6 0
      Userland/Services/WindowServer/WindowManager.cpp

+ 6 - 0
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();