diff options
author | vaxerski <[email protected]> | 2022-04-24 11:18:30 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-04-24 11:18:30 +0200 |
commit | 1afc8329bc4438c3e2f8c3dda9a6743ce5ef7a3a (patch) | |
tree | a090b5c34cb75d4328c79f587018457a5e589c0a | |
parent | ad2c72a79763a441ce98a84c4308be8af454386c (diff) | |
parent | fc14157d765ce44e634525b2c437808e20ec93d6 (diff) | |
download | Hyprland-1afc8329bc4438c3e2f8c3dda9a6743ce5ef7a3a.tar.gz Hyprland-1afc8329bc4438c3e2f8c3dda9a6743ce5ef7a3a.zip |
Merge branch 'main' into animation-system-reworkanimation-system-rework
-rw-r--r-- | src/render/Renderer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 75e42e13..0d50dae4 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -444,11 +444,13 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y) { } void CHyprRenderer::damageWindow(CWindow* pWindow) { + const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID); + if (!pWindow->m_bIsFloating) { // damage by size & pos // TODO TEMP: revise when added shadows/etc - wlr_box damageBox = {pWindow->m_vPosition.x, pWindow->m_vPosition.y, pWindow->m_vSize.x, pWindow->m_vSize.y}; + wlr_box damageBox = {pWindow->m_vPosition.x - PMONITOR->vecPosition.x, pWindow->m_vPosition.y - PMONITOR->vecPosition.y, pWindow->m_vSize.x, pWindow->m_vSize.y}; for (auto& m : g_pCompositor->m_lMonitors) wlr_output_damage_add_box(m.damage, &damageBox); } else { @@ -461,7 +463,7 @@ void CHyprRenderer::damageWindow(CWindow* pWindow) { } void CHyprRenderer::damageMonitor(SMonitor* pMonitor) { - wlr_box damageBox = {pMonitor->vecPosition.x, pMonitor->vecPosition.y, pMonitor->vecSize.x, pMonitor->vecSize.y}; + wlr_box damageBox = {0, 0, pMonitor->vecSize.x, pMonitor->vecSize.y}; scaleBox(&damageBox, pMonitor->scale); wlr_output_damage_add_box(pMonitor->damage, &damageBox); } |