From 23eda1411b2dc990a159b64ad73ac182d12fb4f9 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 20 Jul 2023 18:12:29 +0200 Subject: [PATCH] renderer: scale box for occlusion --- src/render/Renderer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index dcb6c123..6613db2a 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -2013,7 +2013,11 @@ void CHyprRenderer::setOccludedForBackLayers(CRegion& region, CWorkspace* pWorks const Vector2D POS = w->m_vRealPosition.vec() + Vector2D{ROUNDING, ROUNDING} + pWorkspace->m_vRenderOffset.vec(); const Vector2D SIZE = w->m_vRealSize.vec() - Vector2D{ROUNDING * 2, ROUNDING * 2}; - rg.add(POS.x, POS.y, SIZE.x, SIZE.y); + wlr_box box = {POS.x, POS.y, SIZE.x, SIZE.y}; + + scaleBox(&box, PMONITOR->scale); + + rg.add(&box); } region.subtract(rg);