diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-25 22:40:34 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-25 22:40:34 +0200 |
| commit | b0d91cbf3afd72dc320a8f5386b2fe3f3fe0ae68 (patch) | |
| tree | f583c9247dce6136ec7e75003337041e53a32801 /src/Compositor.cpp | |
| parent | db899e00e7e5a5d92bc863f831dd8fe90d55bd57 (diff) | |
simplify formats
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index c68b5322..ab802a1a 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -890,6 +890,34 @@ void CCompositor::cleanupFadingOut(const int& monid) { } for (auto& ls : m_vSurfacesFadingOut) { + + // sometimes somehow fucking happens wtf + bool exists = false; + for (auto& m : m_vMonitors) { + for (auto& lsl : m->m_aLayerSurfaceLists) { + for (auto& lsp : lsl) { + if (lsp.get() == ls) { + exists = true; + break; + } + } + + if (exists) + break; + } + + if (exists) + break; + } + + if (!exists) { + m_vSurfacesFadingOut.erase(std::remove(m_vSurfacesFadingOut.begin(), m_vSurfacesFadingOut.end(), ls)); + + Debug::log(LOG, "Fading out a non-existent LS??"); + + return; + } + if (ls->monitorID != monid) continue; |
