From 9f5b9053c6fb7942a0ff27dc61fc6874e4354888 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 10 Dec 2023 16:28:12 +0000 Subject: internal: Remake borders as window decorations (#4104) --- src/render/decorations/CHyprDropShadowDecoration.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/render/decorations/CHyprDropShadowDecoration.cpp') diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp index bbf6def4..5e70b639 100644 --- a/src/render/decorations/CHyprDropShadowDecoration.cpp +++ b/src/render/decorations/CHyprDropShadowDecoration.cpp @@ -116,13 +116,13 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D CBox withDecos = m_bLastWindowBoxWithDecos; // get window box - windowBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET).scale(pMonitor->scale).round(); - withDecos.translate(-pMonitor->vecPosition + WORKSPACEOFFSET).scale(pMonitor->scale).round(); + windowBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET); + withDecos.translate(-pMonitor->vecPosition + WORKSPACEOFFSET); - auto scaledDecoExtents = withDecos.extentsFrom(windowBox).round(); + auto extentss = withDecos.extentsFrom(windowBox); // add extents - windowBox.addExtents(scaledDecoExtents).round(); + windowBox.addExtents(extentss).scale(pMonitor->scale).round(); if (windowBox.width < 1 || windowBox.height < 1) return; // prevent assert failed @@ -159,7 +159,7 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D g_pHyprOpenGL->m_RenderData.damage = saveDamage; } else { - g_pHyprOpenGL->renderRoundedShadow(&fullBox, ROUNDING * pMonitor->scale, *PSHADOWSIZE * pMonitor->scale, a); + g_pHyprOpenGL->renderRoundedShadow(&fullBox, ROUNDING * pMonitor->scale, *PSHADOWSIZE * pMonitor->scale, m_pWindow->m_cRealShadowColor.col(), a); } if (m_seExtents != m_seReportedExtents) -- cgit v1.2.3