From a0bc0e4998f464656e74cbc683986204189ebefb Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 3 Feb 2023 17:18:22 +0000 Subject: [PATCH] make a null surface focus reset lastfocus --- src/Compositor.cpp | 1 + src/managers/SessionLockManager.cpp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 616cb829..68b45df9 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -902,6 +902,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { wlr_seat_keyboard_clear_focus(m_sSeat.seat); g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // unfocused g_pInputManager->m_sIMERelay.onKeyboardFocus(nullptr); + g_pCompositor->m_pLastFocus = nullptr; return; } diff --git a/src/managers/SessionLockManager.cpp b/src/managers/SessionLockManager.cpp index 5473cb29..c3336ace 100644 --- a/src/managers/SessionLockManager.cpp +++ b/src/managers/SessionLockManager.cpp @@ -108,8 +108,6 @@ void CSessionLockManager::onNewSessionLock(wlr_session_lock_v1* pWlrLock) { g_pCompositor->m_sSeat.exclusiveClient = nullptr; - g_pInputManager->refocus(); - g_pCompositor->focusSurface(nullptr); for (auto& m : g_pCompositor->m_vMonitors)