1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

WindowServer: Allow changing frameless state after a window is created

This commit is contained in:
Tom 2021-02-20 23:10:21 -07:00 committed by Andreas Kling
parent 368fe0f7f8
commit 1c31bcb24e
7 changed files with 39 additions and 2 deletions

View file

@ -500,6 +500,19 @@ void Window::set_visible(bool b)
Compositor::the().invalidate_screen(frame().render_rect());
}
void Window::set_frameless(bool frameless)
{
if (m_frameless == frameless)
return;
auto render_rect_before = frame().render_rect();
m_frameless = frameless;
if (m_visible) {
Compositor::the().invalidate_occlusions();
invalidate(true, true);
Compositor::the().invalidate_screen(frameless ? render_rect_before : frame().render_rect());
}
}
void Window::invalidate(bool invalidate_frame, bool re_render_frame)
{
m_invalidated = true;