summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
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