From 80f8524e65c558bd016561bd9f77bbaa4e087bd3 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 6 Apr 2024 14:59:30 +0100 Subject: [PATCH] compositor: fix ghost fadingOut windows remaining after cleanup --- src/Compositor.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 92c967f0..ccc34ae1 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1459,19 +1459,14 @@ void CCompositor::cleanupFadingOut(const int& monid) { if (w->m_iMonitorID != (long unsigned int)monid) continue; - bool valid = windowExists(w); + if (!w->m_bFadingOut || w->m_fAlpha.value() == 0.f) { - if (!valid || !w->m_bFadingOut || w->m_fAlpha.value() == 0.f) { - if (valid) { - w->m_bFadingOut = false; + w->m_bFadingOut = false; - if (!w->m_bReadyToDelete) - continue; + if (!w->m_bReadyToDelete) + continue; - removeWindowFromVectorSafe(w); - } - - std::erase(m_vWindowsFadingOut, w); + removeWindowFromVectorSafe(w); Debug::log(LOG, "Cleanup: destroyed a window"); return;