summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-01-22 22:11:02 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-23 08:34:17 +0100
commit6a552f0b93b8d1f55b75ce8abc30c658b06d32de (patch)
tree7eac8c15e30a1c7d48c7726eb44ac273bd57a35c /Userland/Services
parent399908e53cfc7803d71a6916154f60db1838b185 (diff)
downloadserenity-6a552f0b93b8d1f55b75ce8abc30c658b06d32de.zip
WindowServer: Remember the correct untiled rect
What a silly logic bug! :)
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/WindowServer/Window.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp
index f4a028093b..db63cce5ac 100644
--- a/Userland/Services/WindowServer/Window.cpp
+++ b/Userland/Services/WindowServer/Window.cpp
@@ -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));
}