diff options
author | Vaxry <[email protected]> | 2024-08-29 23:30:12 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-29 23:30:12 +0200 |
commit | 604eb21a7e55d85ec7f6cb8cba39fc4c20a07a9d (patch) | |
tree | 7b31fb7e21d779fee2911aa7430feed1ec3774d6 /src/managers/SessionLockManager.cpp | |
parent | 92a0dd164e9cc74060b63abae67b0204b6b6074c (diff) | |
download | Hyprland-604eb21a7e55d85ec7f6cb8cba39fc4c20a07a9d.tar.gz Hyprland-604eb21a7e55d85ec7f6cb8cba39fc4c20a07a9d.zip |
renderer: better lockscreen dead behavior (#7574)
---------
Co-authored-by: Mihai Fufezan <[email protected]>
Diffstat (limited to 'src/managers/SessionLockManager.cpp')
-rw-r--r-- | src/managers/SessionLockManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/managers/SessionLockManager.cpp b/src/managers/SessionLockManager.cpp index 81e22889..7267b8f2 100644 --- a/src/managers/SessionLockManager.cpp +++ b/src/managers/SessionLockManager.cpp @@ -4,6 +4,7 @@ #include "../protocols/FractionalScale.hpp" #include "../protocols/SessionLock.hpp" #include <algorithm> +#include <ranges> SSessionLockSurface::SSessionLockSurface(SP<CSessionLockSurface> surface_) : surface(surface_) { pWlrSurface = surface->surface(); @@ -166,3 +167,7 @@ void CSessionLockManager::removeSessionLockSurface(SSessionLockSurface* pSLS) { bool CSessionLockManager::isSessionLockPresent() { return m_pSessionLock && !m_pSessionLock->vSessionLockSurfaces.empty(); } + +bool CSessionLockManager::anySessionLockSurfacesPresent() { + return m_pSessionLock && std::ranges::any_of(m_pSessionLock->vSessionLockSurfaces, [](const auto& surf) { return surf->mapped; }); +} |