mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 13:03:48 -07:00
renderer: better lockscreen dead behavior (#7574)
--------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
This commit is contained in:
@@ -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; });
|
||||
}
|
||||
|
Reference in New Issue
Block a user