renderer: better lockscreen dead behavior (#7574)

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
This commit is contained in:
Vaxry
2024-08-29 23:30:12 +02:00
committed by GitHub
parent 92a0dd164e
commit 604eb21a7e
14 changed files with 171 additions and 37 deletions

View File

@@ -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; });
}