From c2fcc3a62172536e14180d3d55859ebd35a49b8c Mon Sep 17 00:00:00 2001 From: MacDue Date: Sat, 19 Feb 2022 18:43:25 +0000 Subject: [PATCH] WindowServer: Disable shadow rendering for themes with a border-radius The current shadow renderer only works for purely rectangular windows, when enabled with border radiuses the corners are wrong. --- Userland/Services/WindowServer/WindowFrame.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Services/WindowServer/WindowFrame.cpp b/Userland/Services/WindowServer/WindowFrame.cpp index 99819daa02..0a1cc03ecf 100644 --- a/Userland/Services/WindowServer/WindowFrame.cpp +++ b/Userland/Services/WindowServer/WindowFrame.cpp @@ -190,6 +190,9 @@ MultiScaleBitmaps const* WindowFrame::shadow_bitmap() const case WindowType::WindowSwitcher: return nullptr; default: + // FIXME: Support shadow for themes with border radius + if (WindowManager::the().palette().window_border_radius() > 0) + return nullptr; if (auto* highlight_window = WindowManager::the().highlight_window()) return highlight_window == &m_window ? s_active_window_shadow : s_inactive_window_shadow; return m_window.is_active() ? s_active_window_shadow : s_inactive_window_shadow;