diff --git a/src/protocols/SessionLock.cpp b/src/protocols/SessionLock.cpp index ee7e201d..a33af3c5 100644 --- a/src/protocols/SessionLock.cpp +++ b/src/protocols/SessionLock.cpp @@ -51,6 +51,10 @@ CSessionLockSurface::CSessionLockSurface(SP resource_, wlr_surface_unmap(pSurface); hyprListener_surfaceCommit.removeCallback(); hyprListener_surfaceDestroy.removeCallback(); + + if (g_pCompositor->m_pLastFocus == pSurface) + g_pCompositor->m_pLastFocus = nullptr; + pSurface = nullptr; }, this, "SessionLockSurface");