From 6ff041dcfcb9f12a45c207dc8963e0b89d138f6c Mon Sep 17 00:00:00 2001 From: MacDue Date: Sat, 19 Feb 2022 18:44:04 +0000 Subject: [PATCH] WindowServer: Treat window frames with a border radius as transparent Without this, there are repainting artefacts when the window is moved. --- Userland/Services/WindowServer/WindowFrame.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Userland/Services/WindowServer/WindowFrame.cpp b/Userland/Services/WindowServer/WindowFrame.cpp index 0a1cc03ecf..97c7b44cc4 100644 --- a/Userland/Services/WindowServer/WindowFrame.cpp +++ b/Userland/Services/WindowServer/WindowFrame.cpp @@ -571,7 +571,8 @@ Gfx::IntRect WindowFrame::unconstrained_render_rect() const Gfx::DisjointRectSet WindowFrame::opaque_render_rects() const { - if (has_alpha_channel()) { + auto border_radius = WindowManager::the().palette().window_border_radius(); + if (has_alpha_channel() || border_radius > 0) { if (m_window.is_opaque()) return constrained_render_rect_to_screen(m_window.rect()); return {}; @@ -585,7 +586,8 @@ Gfx::DisjointRectSet WindowFrame::opaque_render_rects() const Gfx::DisjointRectSet WindowFrame::transparent_render_rects() const { - if (has_alpha_channel()) { + auto border_radius = WindowManager::the().palette().window_border_radius(); + if (has_alpha_channel() || border_radius > 0) { if (m_window.is_opaque()) { Gfx::DisjointRectSet transparent_rects; transparent_rects.add_many(render_rect().shatter(m_window.rect()));