From 0ba2e6870478bcf1af1b6508677b46a3484fb21f Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 12 Nov 2023 17:02:31 +0000 Subject: [PATCH] deco-positioner: don't remove hidden windows' data --- src/render/decorations/DecorationPositioner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/render/decorations/DecorationPositioner.cpp b/src/render/decorations/DecorationPositioner.cpp index 840fd907..937eaa9a 100644 --- a/src/render/decorations/DecorationPositioner.cpp +++ b/src/render/decorations/DecorationPositioner.cpp @@ -84,9 +84,9 @@ CDecorationPositioner::SWindowPositioningData* CDecorationPositioner::getDataFor } void CDecorationPositioner::sanitizeDatas() { - std::erase_if(m_mWindowDatas, [](const auto& other) { return !g_pCompositor->windowValidMapped(other.first); }); + std::erase_if(m_mWindowDatas, [](const auto& other) { return !g_pCompositor->windowExists(other.first); }); std::erase_if(m_vWindowPositioningDatas, [](const auto& other) { - if (!g_pCompositor->windowValidMapped(other->pWindow)) + if (!g_pCompositor->windowExists(other->pWindow)) return true; if (std::find_if(other->pWindow->m_dWindowDecorations.begin(), other->pWindow->m_dWindowDecorations.end(), [&](const auto& el) { return el.get() == other->pDecoration; }) == other->pWindow->m_dWindowDecorations.end()) @@ -96,7 +96,7 @@ void CDecorationPositioner::sanitizeDatas() { } void CDecorationPositioner::onWindowUpdate(CWindow* pWindow) { - if (!g_pCompositor->windowValidMapped(pWindow)) + if (!g_pCompositor->windowExists(pWindow) || !pWindow->m_bIsMapped) return; const auto WIT = std::find_if(m_mWindowDatas.begin(), m_mWindowDatas.end(), [&](const auto& other) { return other.first == pWindow; });