summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 50ce621a..4b6999c7 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -513,7 +513,7 @@ CWindow* CCompositor::getWindowForPopup(wlr_xdg_popup* popup) {
wlr_surface* CCompositor::vectorToLayerSurface(const Vector2D& pos, std::list<SLayerSurface*>* layerSurfaces, Vector2D* sCoords) {
for (auto& l : *layerSurfaces) {
- if (!l->layerSurface->mapped)
+ if (l->fadingOut || (l->layerSurface && !l->layerSurface->mapped))
continue;
const auto SURFACEAT = wlr_layer_surface_v1_surface_at(l->layerSurface, pos.x - l->geometry.x, pos.y - l->geometry.y, &sCoords->x, &sCoords->y);
@@ -650,6 +650,24 @@ void CCompositor::cleanupWindows() {
return;
}
}
+
+ for (auto& ls : m_lSurfacesFadingOut) {
+ if (ls->fadingOut && ls->readyToDelete && !ls->alpha.isBeingAnimated()) {
+ for (auto& m : m_lMonitors) {
+ for (auto& lsl : m.m_aLayerSurfaceLists) {
+ lsl.remove(ls);
+ }
+ }
+
+ g_pHyprOpenGL->m_mLayerFramebuffers[ls].release();
+ g_pHyprOpenGL->m_mLayerFramebuffers.erase(ls);
+
+ m_lSurfacesFadingOut.remove(ls);
+ delete ls;
+
+ return;
+ }
+ }
}
CWindow* CCompositor::getWindowInDirection(CWindow* pWindow, char dir) {
@@ -863,4 +881,4 @@ SMonitor* CCompositor::getMonitorInDirection(const char& dir) {
return longestIntersectMonitor;
return nullptr;
-} \ No newline at end of file
+}