summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/Window.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-04-15 22:40:58 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-16 17:28:05 +0200
commite632186c17e109f483eeecb44d574b6fb5ce4ba3 (patch)
treec0fb10ad244520eb3e21b5f314d796fb1cca6fcf /Userland/Services/WindowServer/Window.cpp
parent0aebb9ec62180dff011ce6c7ab02d3ab74a607ab (diff)
downloadserenity-e632186c17e109f483eeecb44d574b6fb5ce4ba3.zip
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).
Diffstat (limited to 'Userland/Services/WindowServer/Window.cpp')
-rw-r--r--Userland/Services/WindowServer/Window.cpp1
1 files changed, 1 insertions, 0 deletions
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;