diff options
Diffstat (limited to 'src/events/Layers.cpp')
-rw-r--r-- | src/events/Layers.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index 86e2ca1a..d5ad2245 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -59,28 +59,11 @@ void Events::listener_destroyLayerSurface(void* owner, void* data) { Debug::log(LOG, "LayerSurface %x destroyed", layersurface->layerSurface); if (!layersurface->fadingOut) { - if (layersurface->layerSurface->mapped) { - Debug::log(LOG, "LayerSurface wasn't unmapped, making a snapshot now!"); - - // make a snapshot and start fade - // layersurfaces aren't required to unmap before destroy - g_pHyprOpenGL->makeLayerSnapshot(layersurface); - layersurface->alpha = 0.f; - - layersurface->fadingOut = true; - } else { - Debug::log(LOG, "Removing LayerSurface that wasn't mapped."); - layersurface->alpha.setValueAndWarp(0.f); - layersurface->fadingOut = true; - } + Debug::log(LOG, "Removing LayerSurface that wasn't mapped."); + layersurface->alpha.setValueAndWarp(0.f); + layersurface->fadingOut = true; } - if (layersurface->layerSurface->mapped) - layersurface->layerSurface->mapped = false; - - if (layersurface->layerSurface->surface == g_pCompositor->m_pLastFocus) - g_pCompositor->m_pLastFocus = nullptr; - layersurface->hyprListener_commitLayerSurface.removeCallback(); layersurface->hyprListener_destroyLayerSurface.removeCallback(); layersurface->hyprListener_mapLayerSurface.removeCallback(); |