summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2024-01-07 14:04:25 +0100
committervaxerski <vaxry@vaxry.net>2024-01-07 14:04:32 +0100
commit7904188de9ca631436484cde733ef871f518d962 (patch)
treed30a1577e04da644eebd9f981352a5ea1c3dbe12 /src/Compositor.cpp
parent666ee61c13e67e3a6943cd96157d9fb0967e596a (diff)
input: allow focusSurface when locked if surfase is sessionLock
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index f3efad86..b98c714d 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1019,10 +1019,8 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
if (m_sSeat.seat->keyboard_state.focused_surface == pSurface || (pWindowOwner && m_sSeat.seat->keyboard_state.focused_surface == pWindowOwner->m_pWLSurface.wlr()))
return; // Don't focus when already focused on this.
- if (g_pSessionLockManager->isSessionLocked()) {
- wlr_seat_keyboard_clear_focus(m_sSeat.seat);
- m_pLastFocus = nullptr;
- }
+ if (g_pSessionLockManager->isSessionLocked() && !g_pSessionLockManager->isSurfaceSessionLock(pSurface))
+ return;
// Unfocus last surface if should
if (m_pLastFocus && !pWindowOwner)