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.
This commit is contained in:
MacDue 2022-02-19 18:43:25 +00:00 committed by Andreas Kling
parent 6c48fd84ad
commit c2fcc3a621
Notes: sideshowbarker 2024-07-17 18:00:46 +09:00

View file

@ -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;