mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 07:01:57 -07:00
adjust ls fading out logic
This commit is contained in:
@@ -896,18 +896,17 @@ void CCompositor::cleanupFadingOut(const int& monid) {
|
|||||||
if (ls->fadingOut && ls->readyToDelete && !ls->alpha.isBeingAnimated()) {
|
if (ls->fadingOut && ls->readyToDelete && !ls->alpha.isBeingAnimated()) {
|
||||||
g_pHyprOpenGL->m_mLayerFramebuffers[ls].release();
|
g_pHyprOpenGL->m_mLayerFramebuffers[ls].release();
|
||||||
g_pHyprOpenGL->m_mLayerFramebuffers.erase(ls);
|
g_pHyprOpenGL->m_mLayerFramebuffers.erase(ls);
|
||||||
|
|
||||||
m_vSurfacesFadingOut.erase(std::remove(m_vSurfacesFadingOut.begin(), m_vSurfacesFadingOut.end(), ls));
|
|
||||||
|
|
||||||
for (auto& m : m_vMonitors) {
|
for (auto& m : m_vMonitors) {
|
||||||
for (auto& lsl : m->m_aLayerSurfaceLists) {
|
for (auto& lsl : m->m_aLayerSurfaceLists) {
|
||||||
if (!lsl.empty() && std::find_if(lsl.begin(), lsl.end(), [&](std::unique_ptr<SLayerSurface>& other) { return other.get() == ls; }) != lsl.end()) {
|
if (!lsl.empty() && std::find_if(lsl.begin(), lsl.end(), [&](std::unique_ptr<SLayerSurface>& other) { return other.get() == ls; }) != lsl.end()) {
|
||||||
lsl.erase(std::remove_if(lsl.begin(), lsl.end(), [&](std::unique_ptr<SLayerSurface>& other) { return other.get() == ls; }));
|
lsl.erase(std::remove_if(lsl.begin(), lsl.end(), [&](std::unique_ptr<SLayerSurface>& other) { return other.get() == ls; }));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_vSurfacesFadingOut.erase(std::remove(m_vSurfacesFadingOut.begin(), m_vSurfacesFadingOut.end(), ls));
|
||||||
|
|
||||||
Debug::log(LOG, "Cleanup: destroyed a layersurface");
|
Debug::log(LOG, "Cleanup: destroyed a layersurface");
|
||||||
|
|
||||||
glFlush(); // to free mem NOW.
|
glFlush(); // to free mem NOW.
|
||||||
|
Reference in New Issue
Block a user