diff --git a/src/helpers/SubsurfaceTree.cpp b/src/helpers/SubsurfaceTree.cpp index 41b968e4..f9b1cb72 100644 --- a/src/helpers/SubsurfaceTree.cpp +++ b/src/helpers/SubsurfaceTree.cpp @@ -264,11 +264,9 @@ void Events::listener_commitSubsurface(void* owner, void* data) { const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID); if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear && pNode->pSurface->wlr()->current.committed & WLR_SURFACE_STATE_BUFFER) { - CRegion damageBox; - wlr_surface_get_effective_damage(pNode->pSurface->wlr(), damageBox.pixman()); + CRegion damageBox{&pNode->pSurface->wlr()->buffer_damage}; if (!damageBox.empty()) { - if (PMONITOR->tearingState.busy) { PMONITOR->tearingState.frameScheduledWhileBusy = true; } else { diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index cf246c7c..d44aafd5 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1575,8 +1575,7 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y, dou y += CORRECTION.y; } - CRegion damageBox; - wlr_surface_get_effective_damage(pSurface, damageBox.pixman()); + CRegion damageBox{&pSurface->buffer_damage}; if (scale != 1.0) wlr_region_scale(damageBox.pixman(), damageBox.pixman(), scale);