summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 83fcdfcb..cdcf880c 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -852,9 +852,12 @@ void CCompositor::moveWindowToTop(CWindow* pWindow) {
}
}
-void CCompositor::cleanupFadingOut() {
+void CCompositor::cleanupFadingOut(const int& monid) {
for (auto& w : m_vWindowsFadingOut) {
+ if (w->m_iMonitorID != (long unsigned int)monid)
+ continue;
+
bool valid = windowExists(w);
if (!valid || !w->m_bFadingOut || w->m_fAlpha.fl() == 0.f) {
@@ -867,11 +870,16 @@ void CCompositor::cleanupFadingOut() {
m_vWindowsFadingOut.erase(std::remove(m_vWindowsFadingOut.begin(), m_vWindowsFadingOut.end(), w));
Debug::log(LOG, "Cleanup: destroyed a window");
+
+ glFlush(); // to free mem NOW.
return;
}
}
for (auto& ls : m_vSurfacesFadingOut) {
+ if (ls->monitorID != monid)
+ continue;
+
if (ls->fadingOut && ls->readyToDelete && !ls->alpha.isBeingAnimated()) {
for (auto& m : m_vMonitors) {
for (auto& lsl : m->m_aLayerSurfaceLists) {
@@ -887,6 +895,7 @@ void CCompositor::cleanupFadingOut() {
Debug::log(LOG, "Cleanup: destroyed a layersurface");
+ glFlush(); // to free mem NOW.
return;
}
}