summaryrefslogtreecommitdiff
path: root/src/managers/SessionLockManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/SessionLockManager.cpp')
-rw-r--r--src/managers/SessionLockManager.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/managers/SessionLockManager.cpp b/src/managers/SessionLockManager.cpp
index 1e366034..a0374b85 100644
--- a/src/managers/SessionLockManager.cpp
+++ b/src/managers/SessionLockManager.cpp
@@ -172,6 +172,17 @@ bool CSessionLockManager::isSurfaceSessionLock(wlr_surface* pSurface) {
void CSessionLockManager::removeSessionLockSurface(SSessionLockSurface* pSLS) {
std::erase_if(m_sSessionLock.vSessionLockSurfaces, [&](const auto& other) { return pSLS == other.get(); });
+
+ if (g_pCompositor->m_pLastFocus)
+ return;
+
+ for (auto& sls : m_sSessionLock.vSessionLockSurfaces) {
+ if (!sls->mapped)
+ continue;
+
+ g_pCompositor->focusSurface(sls->pWlrLockSurface->surface);
+ break;
+ }
}
void CSessionLockManager::activateLock() {