summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-25 22:00:46 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-25 22:00:46 +0200
commitdb899e00e7e5a5d92bc863f831dd8fe90d55bd57 (patch)
tree2a398266b2caefa2daef6d62897a5a8adb33c03c /src/Compositor.cpp
parent6e16dfa5e5592e9662f839a9696f2863e2428bc5 (diff)
adjust ls fading out logic
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 34955eca..c68b5322 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -896,18 +896,17 @@ void CCompositor::cleanupFadingOut(const int& monid) {
if (ls->fadingOut && ls->readyToDelete && !ls->alpha.isBeingAnimated()) {
g_pHyprOpenGL->m_mLayerFramebuffers[ls].release();
g_pHyprOpenGL->m_mLayerFramebuffers.erase(ls);
-
- m_vSurfacesFadingOut.erase(std::remove(m_vSurfacesFadingOut.begin(), m_vSurfacesFadingOut.end(), ls));
for (auto& m : m_vMonitors) {
for (auto& lsl : m->m_aLayerSurfaceLists) {
if (!lsl.empty() && std::find_if(lsl.begin(), lsl.end(), [&](std::unique_ptr<SLayerSurface>& other) { return other.get() == ls; }) != lsl.end()) {
lsl.erase(std::remove_if(lsl.begin(), lsl.end(), [&](std::unique_ptr<SLayerSurface>& other) { return other.get() == ls; }));
- return;
}
}
}
+ m_vSurfacesFadingOut.erase(std::remove(m_vSurfacesFadingOut.begin(), m_vSurfacesFadingOut.end(), ls));
+
Debug::log(LOG, "Cleanup: destroyed a layersurface");
glFlush(); // to free mem NOW.