summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-10 14:46:23 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-10 14:46:23 +0200
commitc6f098c5a90c7488f29d0092bb9d8ec7c32f2c1f (patch)
tree59165d8ccc222671698c21bc5bbe427f57690d09
parent61e112d3b7edf24abbaef8a3034f716ecfd898cf (diff)
downloadserenity-c6f098c5a90c7488f29d0092bb9d8ec7c32f2c1f.zip
WindowServer: Add 2px of tasteful space above maximized windows
This makes the visual interaction between the menu bar and the window a lot less janky looking.
-rw-r--r--Services/WindowServer/WindowManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Services/WindowServer/WindowManager.cpp b/Services/WindowServer/WindowManager.cpp
index a5fac927d0..52b437169a 100644
--- a/Services/WindowServer/WindowManager.cpp
+++ b/Services/WindowServer/WindowManager.cpp
@@ -1252,6 +1252,10 @@ Gfx::Rect WindowManager::maximized_window_rect(const Window& window) const
return IterationDecision::Break;
});
+ constexpr int tasteful_space_above_maximized_window = 2;
+ rect.set_y(rect.y() + tasteful_space_above_maximized_window);
+ rect.set_height(rect.height() - tasteful_space_above_maximized_window);
+
return rect;
}