aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-04-24 11:18:30 +0200
committerGitHub <[email protected]>2022-04-24 11:18:30 +0200
commit1afc8329bc4438c3e2f8c3dda9a6743ce5ef7a3a (patch)
treea090b5c34cb75d4328c79f587018457a5e589c0a
parentad2c72a79763a441ce98a84c4308be8af454386c (diff)
parentfc14157d765ce44e634525b2c437808e20ec93d6 (diff)
downloadHyprland-1afc8329bc4438c3e2f8c3dda9a6743ce5ef7a3a.tar.gz
Hyprland-1afc8329bc4438c3e2f8c3dda9a6743ce5ef7a3a.zip
Merge branch 'main' into animation-system-reworkanimation-system-rework
-rw-r--r--src/render/Renderer.cpp6
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);
}