From e632186c17e109f483eeecb44d574b6fb5ce4ba3 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 15 Apr 2021 22:40:58 +0200 Subject: [PATCH] WindowServer: Recalculate window rect when toggling menubar This is important when the window is maximized or tiled (which recalculate_rect() will both check), as we otherwise create a gap above the window frame (when hiding the menubar) or push the frame off the screen (when showing the menubar). --- Userland/Services/WindowServer/Window.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp index d8f08772e4..7ac529e4cb 100644 --- a/Userland/Services/WindowServer/Window.cpp +++ b/Userland/Services/WindowServer/Window.cpp @@ -700,6 +700,7 @@ void Window::ensure_window_menu() item.set_checked(!item.is_checked()); m_should_show_menubar = item.is_checked(); frame().invalidate(); + recalculate_rect(); Compositor::the().invalidate_occlusions(); Compositor::the().invalidate_screen(); break;