From 747ff3369d6377628e3e27e3b108c8d61cbc5733 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 25 Jun 2022 20:28:40 +0200 Subject: added drop shadows --- src/render/Renderer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/render/Renderer.cpp') diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index a917a1cc..5d99565b 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -569,7 +569,7 @@ void CHyprRenderer::damageWindow(CWindow* pWindow) { // damage by size & pos // TODO TEMP: revise when added shadows/etc - wlr_box damageBox = {pWindow->m_vRealPosition.vec().x, pWindow->m_vRealPosition.vec().y, pWindow->m_vRealSize.vec().x, pWindow->m_vRealSize.vec().y}; + wlr_box damageBox = pWindow->getFullWindowBoundingBox(); for (auto& m : g_pCompositor->m_lMonitors) { wlr_box fixedDamageBox = damageBox; fixedDamageBox.x -= m.vecPosition.x; @@ -584,8 +584,7 @@ void CHyprRenderer::damageWindow(CWindow* pWindow) { Debug::log(LOG, "Damage: Window floated (%s): xy: %d, %d wh: %d, %d", pWindow->m_szTitle.c_str(), damageBox.x, damageBox.y, damageBox.width, damageBox.height); } else { // damage by real size & pos + border size * 2 (JIC) - static auto *const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue; - wlr_box damageBox = { pWindow->m_vRealPosition.vec().x - *PBORDERSIZE - 1, pWindow->m_vRealPosition.vec().y - *PBORDERSIZE - 1, pWindow->m_vRealSize.vec().x + 2 * *PBORDERSIZE + 2, pWindow->m_vRealSize.vec().y + 2 * *PBORDERSIZE + 2}; + wlr_box damageBox = pWindow->getFullWindowBoundingBox(); for (auto& m : g_pCompositor->m_lMonitors) { wlr_box fixedDamageBox = damageBox; fixedDamageBox.x -= m.vecPosition.x; -- cgit v1.2.3