popups: more safety in damage checking

This commit is contained in:
Vaxry 2024-04-04 16:42:24 +01:00
parent 9b8ef9206d
commit 4f3e90ad2d

View file

@ -155,6 +155,9 @@ void CPopup::onCommit(bool ignoreSiblings) {
return; return;
} }
if (!m_pWLR->base->surface->mapped)
return;
const auto COORDS = coordsGlobal(); const auto COORDS = coordsGlobal();
const auto COORDSLOCAL = coordsRelativeToParent(); const auto COORDSLOCAL = coordsRelativeToParent();
@ -168,7 +171,7 @@ void CPopup::onCommit(bool ignoreSiblings) {
m_vLastPos = COORDSLOCAL; m_vLastPos = COORDSLOCAL;
} }
if (!ignoreSiblings) if (!ignoreSiblings && m_pSubsurfaceHead)
m_pSubsurfaceHead->recheckDamageForSubsurfaces(); m_pSubsurfaceHead->recheckDamageForSubsurfaces();
g_pHyprRenderer->damageSurface(m_sWLSurface.wlr(), COORDS.x, COORDS.y); g_pHyprRenderer->damageSurface(m_sWLSurface.wlr(), COORDS.x, COORDS.y);