diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-03 11:58:55 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-03 11:58:55 +0000 |
| commit | 129e99a6f60eac7ece31a1ccd1e781075fd53050 (patch) | |
| tree | 013b31817af992a52d733369a7227a237e8c0d26 /src/managers/input/InputManager.cpp | |
| parent | 32d56fec977b109aeecb06288a1b45cfe6b83117 (diff) | |
Implement ext-session-lock-v1
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index e3bd9c81..b2e653ae 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -85,7 +85,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { // constraints // All constraints TODO: multiple mice? - if (g_pCompositor->m_sSeat.mouse->currentConstraint && !g_pCompositor->m_sSeat.exclusiveClient) { + if (g_pCompositor->m_sSeat.mouse->currentConstraint && !g_pCompositor->m_sSeat.exclusiveClient && !g_pSessionLockManager->isSessionLocked()) { // XWayland windows sometimes issue constraints weirdly. // TODO: We probably should search their parent. wlr_xwayland_surface->parent const auto CONSTRAINTWINDOW = g_pCompositor->getConstraintWindow(g_pCompositor->m_sSeat.mouse); @@ -149,6 +149,16 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { ACTIVEWORKSPACE->setActive(true); } + if (g_pSessionLockManager->isSessionLocked()) { + const auto PSLS = PMONITOR ? g_pSessionLockManager->getSessionLockSurfaceForMonitor(PMONITOR->ID) : nullptr; + + if (!PSLS) + return; + + foundSurface = PSLS->pWlrLockSurface->surface; + surfacePos = PMONITOR->vecPosition; + } + // overlay is above fullscreen if (!foundSurface) foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], &surfaceCoords, &pFoundLayerSurface); |
