summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-02-19 18:44:04 +0000
committerAndreas Kling <kling@serenityos.org>2022-03-02 21:56:57 +0100
commit6ff041dcfcb9f12a45c207dc8963e0b89d138f6c (patch)
tree9c10df473b0e70b2c4caba2ebb2cd952175e28f0 /Userland/Services/WindowServer
parentc2fcc3a62172536e14180d3d55859ebd35a49b8c (diff)
downloadserenity-6ff041dcfcb9f12a45c207dc8963e0b89d138f6c.zip
WindowServer: Treat window frames with a border radius as transparent
Without this, there are repainting artefacts when the window is moved.
Diffstat (limited to 'Userland/Services/WindowServer')
-rw-r--r--Userland/Services/WindowServer/WindowFrame.cpp6
1 files 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()));