compositor: fix ghost fadingOut windows remaining after cleanup

This commit is contained in:
Vaxry 2024-04-06 14:59:30 +01:00
parent f8c22916ab
commit 159444c45b
1 changed files with 5 additions and 10 deletions

View File

@ -1419,19 +1419,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;