subsurface: damage the entire parent on size change

the previous method doesn't exactly work, idk todo fix

fixes #8784
This commit is contained in:
Vaxry
2025-01-25 21:57:58 +00:00
parent 445acec2a2
commit 8b1d6e3009

View File

@@ -101,10 +101,19 @@ void CSubsurface::onCommit() {
checkSiblingDamage();
if (m_vLastSize != m_pWLSurface->resource()->current.size) {
CBox box{COORDS, m_vLastSize};
g_pHyprRenderer->damageBox(&box);
m_vLastSize = m_pWLSurface->resource()->current.size;
box = {COORDS, m_vLastSize};
// TODO: fix this
// CBox box{COORDS, m_vLastSize};
// g_pHyprRenderer->damageBox(&box);
// m_vLastSize = m_pWLSurface->resource()->current.size;
// box = {COORDS, m_vLastSize};
// g_pHyprRenderer->damageBox(&box);
CBox box;
if (m_pPopupParent)
box = m_pPopupParent->m_pWLSurface->getSurfaceBoxGlobal().value_or(CBox{});
else if (m_pWindowParent)
box = m_pWindowParent->getWindowMainSurfaceBox();
g_pHyprRenderer->damageBox(&box);
}
}