1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

WindowServer: Remember the correct untiled rect

What a silly logic bug! :)
This commit is contained in:
Ben Wiederhake 2021-01-22 22:11:02 +01:00 committed by Andreas Kling
parent 399908e53c
commit 6a552f0b93

View file

@ -688,9 +688,10 @@ void Window::set_tiled(WindowTileType tiled)
if (resize_aspect_ratio().has_value())
return;
m_tiled = tiled;
if (tiled != WindowTileType::None)
if (m_tiled == WindowTileType::None)
m_untiled_rect = m_rect;
m_tiled = tiled;
set_rect(tiled_rect(tiled));
Core::EventLoop::current().post_event(*this, make<ResizeEvent>(m_rect));
}