diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-12 19:20:13 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-12 19:20:13 +0000 |
| commit | 79ad93d5366e3213abbf32394cc284855e39ba40 (patch) | |
| tree | 244d70c9a0103637cee57230a5b37260a1fc80ee /src/Compositor.cpp | |
| parent | 7d914cd427b36d5ec8acb06e415cdf2b846f1648 (diff) | |
clear focus on lockscreen refocus
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 68070c2e..e9dad892 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -896,6 +896,11 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { (pWindowOwner && m_sSeat.seat->keyboard_state.focused_surface == g_pXWaylandManager->getWindowSurface(pWindowOwner))) return; // Don't focus when already focused on this. + if (g_pSessionLockManager->isSessionLocked()) { + wlr_seat_keyboard_clear_focus(m_sSeat.seat); + m_pLastFocus = nullptr; + } + // Unfocus last surface if should if (m_pLastFocus && !pWindowOwner) g_pXWaylandManager->activateSurface(m_pLastFocus, false); @@ -905,7 +910,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // unfocused g_pEventManager->postEvent(SHyprIPCEvent{"activewindowv2", ","}); g_pInputManager->m_sIMERelay.onKeyboardFocus(nullptr); - g_pCompositor->m_pLastFocus = nullptr; + m_pLastFocus = nullptr; return; } |
