summaryrefslogtreecommitdiff
path: root/src/helpers/SubsurfaceTree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/SubsurfaceTree.cpp')
-rw-r--r--src/helpers/SubsurfaceTree.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/helpers/SubsurfaceTree.cpp b/src/helpers/SubsurfaceTree.cpp
index 5b86f928..0efa4c49 100644
--- a/src/helpers/SubsurfaceTree.cpp
+++ b/src/helpers/SubsurfaceTree.cpp
@@ -250,8 +250,14 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
// tearing: if solitary, redraw it. This still might be a single surface window
const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID);
if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->canTear) {
- PMONITOR->nextRenderTorn = true;
- g_pHyprRenderer->renderMonitor(PMONITOR);
+
+ CRegion damageBox;
+ wlr_surface_get_effective_damage(pNode->pSurface->wlr(), damageBox.pixman());
+
+ if (!damageBox.empty()) {
+ PMONITOR->nextRenderTorn = true;
+ g_pHyprRenderer->renderMonitor(PMONITOR);
+ }
}
}
}