summaryrefslogtreecommitdiff
path: root/src/managers/SessionLockManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-02-18 01:09:01 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-02-18 01:09:01 +0000
commitb944386ca54cf650d660caac31f065c0211168b1 (patch)
treeea4721dee363b8f87a461f31ac230747b96f9c18 /src/managers/SessionLockManager.cpp
parentbe2e4d9dd1e58991a4f54078a331cbcbd8265c7f (diff)
reset focus on lock surface destroy
Diffstat (limited to 'src/managers/SessionLockManager.cpp')
-rw-r--r--src/managers/SessionLockManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/managers/SessionLockManager.cpp b/src/managers/SessionLockManager.cpp
index c3336ace..29e6ddca 100644
--- a/src/managers/SessionLockManager.cpp
+++ b/src/managers/SessionLockManager.cpp
@@ -36,6 +36,9 @@ static void handleSurfaceDestroy(void* owner, void* data) {
PSURFACE->hyprListener_destroy.removeCallback();
PSURFACE->hyprListener_map.removeCallback();
+ if (PSURFACE->pWlrLockSurface->surface == g_pCompositor->m_pLastFocus)
+ g_pCompositor->m_pLastFocus = nullptr;
+
g_pSessionLockManager->removeSessionLockSurface(PSURFACE);
}