From 4f3e90ad2d35db7a79bdf4b64d4c9377f5bb24bf Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 4 Apr 2024 16:42:24 +0100 Subject: [PATCH] popups: more safety in damage checking --- src/desktop/Popup.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp index a32b28d6..6a2aca7e 100644 --- a/src/desktop/Popup.cpp +++ b/src/desktop/Popup.cpp @@ -155,6 +155,9 @@ void CPopup::onCommit(bool ignoreSiblings) { return; } + if (!m_pWLR->base->surface->mapped) + return; + const auto COORDS = coordsGlobal(); const auto COORDSLOCAL = coordsRelativeToParent(); @@ -168,7 +171,7 @@ void CPopup::onCommit(bool ignoreSiblings) { m_vLastPos = COORDSLOCAL; } - if (!ignoreSiblings) + if (!ignoreSiblings && m_pSubsurfaceHead) m_pSubsurfaceHead->recheckDamageForSubsurfaces(); g_pHyprRenderer->damageSurface(m_sWLSurface.wlr(), COORDS.x, COORDS.y);