compositor: remove windows from fadingOut properly

This commit is contained in:
Vaxry 2024-04-06 14:51:35 +01:00
parent ec73f033aa
commit 6e4c15e70a

View File

@ -692,10 +692,10 @@ CMonitor* CCompositor::getMonitorFromVector(const Vector2D& point) {
}
void CCompositor::removeWindowFromVectorSafe(CWindow* pWindow) {
if (windowExists(pWindow) && !pWindow->m_bFadingOut)
if (windowExists(pWindow) && !pWindow->m_bFadingOut) {
std::erase_if(m_vWindows, [&](std::unique_ptr<CWindow>& el) { return el.get() == pWindow; });
std::erase_if(m_vWindowsFadingOut, [&](CWindow* el) { return el == pWindow; });
std::erase_if(m_vWindowsFadingOut, [&](CWindow* el) { return el == pWindow; });
}
}
bool CCompositor::windowExists(CWindow* pWindow) {