Skip to content

Commit

Permalink
subsurface: damage the entire parent on size change
Browse files Browse the repository at this point in the history
the previous method doesn't exactly work, idk todo fix

fixes #8784
  • Loading branch information
vaxerski committed Jan 25, 2025
1 parent 445acec commit 8b1d6e3
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/desktop/Subsurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 8b1d6e3

Please sign in to comment.