From f4f0f35c5b2725189563fc65e17a0141fd801eb7 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:13:55 +0200 Subject: renderer: add occlusion for back layers --- src/Window.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index 6be36f5e..dc9a64b4 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -752,6 +752,14 @@ Vector2D CWindow::middle() { } bool CWindow::opaque() { + if (m_fAlpha.fl() != 1.f || m_fActiveInactiveAlpha.fl() != 1.f) + return false; + + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID); + + if (PWORKSPACE->m_fAlpha.fl() != 1.f) + return false; + if (m_bIsX11) return !m_uSurface.xwayland->has_alpha; @@ -764,3 +772,11 @@ bool CWindow::opaque() { return false; } + +float CWindow::rounding() { + static auto* const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue; + + float rounding = m_sAdditionalConfigData.rounding.toUnderlying() == -1 ? *PROUNDING : m_sAdditionalConfigData.rounding.toUnderlying(); + + return rounding; +} -- cgit v1.2.3