From cde39e0b6eba385d3eab4c524b6de80121c174f5 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 25 Jul 2022 20:47:56 +0200 Subject: [PATCH] ls fixes --- src/events/Layers.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index 50b9b504..b3463d98 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -66,7 +66,7 @@ void Events::listener_destroyLayerSurface(void* owner, void* data) { if (!g_pCompositor->getMonitorFromID(layersurface->monitorID)) Debug::log(WARN, "Layersurface destroyed on an invalid monitor (removed?)"); - if (!layersurface->fadingOut && PMONITOR) { + if (!layersurface->fadingOut) { if (layersurface->mapped) { Debug::log(LOG, "Forcing an unmap of a LS that did a straight destroy!"); listener_unmapLayerSurface(layersurface, nullptr); @@ -157,6 +157,14 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) { if (!g_pCompositor->getMonitorFromID(layersurface->monitorID)) { Debug::log(WARN, "Layersurface unmapping on invalid monitor (removed?) ignoring."); + + g_pCompositor->m_vSurfacesFadingOut.push_back(layersurface); + + layersurface->mapped = false; + + layersurface->fadingOut = true; + + layersurface->alpha.setValueAndWarp(0.f); return; }