From c6f098c5a90c7488f29d0092bb9d8ec7c32f2c1f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 10 May 2020 14:46:23 +0200 Subject: [PATCH] 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. --- Services/WindowServer/WindowManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; }