fadein and prep for fadeout

This commit is contained in:
vaxerski
2022-04-05 19:28:10 +02:00
parent f5562941f7
commit f8e0b0b448
11 changed files with 63 additions and 10 deletions

View File

@@ -230,7 +230,7 @@ SMonitor* CCompositor::getMonitorFromVector(const Vector2D& point) {
}
void CCompositor::removeWindowFromVectorSafe(CWindow* pWindow) {
if (windowExists(pWindow))
if (windowExists(pWindow) && !pWindow->m_bFadingOut)
m_lWindows.remove(*pWindow);
}
@@ -552,4 +552,15 @@ void CCompositor::moveWindowToTop(CWindow* pWindow) {
break;
}
}
}
void CCompositor::cleanupWindows() {
for (auto& w : m_lWindowsFadingOut) {
if (!w->m_bFadingOut || w->m_fAlpha == 0.f) {
m_lWindows.remove(*w);
m_lWindowsFadingOut.remove(w);
Debug::log(LOG, "Cleanup: cleaned up a window");
return;
}
}
}