diff options
author | Vaxry <[email protected]> | 2023-11-12 17:02:31 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-11-12 17:02:42 +0000 |
commit | 0ba2e6870478bcf1af1b6508677b46a3484fb21f (patch) | |
tree | 3e8df1bee96055d49b6773a1fc03f1240de79abf | |
parent | e974d1fe98087c7eff333345f58155437ca529cd (diff) | |
download | Hyprland-0ba2e6870478bcf1af1b6508677b46a3484fb21f.tar.gz Hyprland-0ba2e6870478bcf1af1b6508677b46a3484fb21f.zip |
deco-positioner: don't remove hidden windows' data
-rw-r--r-- | src/render/decorations/DecorationPositioner.cpp | 6 |
1 files 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; }); |