1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37:35 +00:00

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).
This commit is contained in:
Linus Groh 2021-04-15 22:40:58 +02:00 committed by Andreas Kling
parent 0aebb9ec62
commit e632186c17

View file

@ -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;