aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-14 17:23:46 +0200
committervaxerski <[email protected]>2022-05-14 17:23:46 +0200
commit109136af97547f35f767dae2e7908ab218dfea11 (patch)
tree806d931d2a3d7d04a9a5faecfcf46d5470f1633f /src/Compositor.cpp
parent694f4433a2b6083cef5a4f43e974f9c70b9857af (diff)
downloadHyprland-109136af97547f35f767dae2e7908ab218dfea11.tar.gz
Hyprland-109136af97547f35f767dae2e7908ab218dfea11.zip
Fadein/out now applies to layersurfaces too
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
+}