aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-02-18 01:09:01 +0000
committervaxerski <[email protected]>2023-02-18 01:09:01 +0000
commitb944386ca54cf650d660caac31f065c0211168b1 (patch)
treeea4721dee363b8f87a461f31ac230747b96f9c18
parentbe2e4d9dd1e58991a4f54078a331cbcbd8265c7f (diff)
downloadHyprland-b944386ca54cf650d660caac31f065c0211168b1.tar.gz
Hyprland-b944386ca54cf650d660caac31f065c0211168b1.zip
reset focus on lock surface destroy
-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);
}