summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-05 19:28:10 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-05 19:28:10 +0200
commitf8e0b0b448b8b68f65ee1c3eebdd4eb3e3382138 (patch)
treeffc828e5fd67f8a429517c1fe01a4780c2ea694c /src/Compositor.cpp
parentf5562941f70a448a2e292449296ff4c6ba26dc37 (diff)
fadein and prep for fadeout
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index bf36bf89..7fdd65bc 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -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;
+ }
+ }
} \ No newline at end of file