mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
WindowServer: Allow changing frameless state after a window is created
This commit is contained in:
parent
368fe0f7f8
commit
1c31bcb24e
7 changed files with 39 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue