From cdf5736f1a5e6cc1c3bb8fd50501ab17189725ea Mon Sep 17 00:00:00 2001 From: Virt <41426325+VirtCode@users.noreply.github.com> Date: Sat, 3 May 2025 16:07:02 +0200 Subject: [PATCH] layerrules: fix abovelock interactivity for touch input (#10253) --- src/managers/input/InputManager.cpp | 6 ++++++ src/managers/input/Touch.cpp | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index c48ca908..f2954c84 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -270,6 +270,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { foundSurface = foundLockSurface; } + if (refocus) { + m_foundLSToFocus = pFoundLayerSurface; + m_foundWindowToFocus = pFoundWindow; + m_foundSurfaceToFocus = foundSurface; + } + g_pSeatManager->setPointerFocus(foundSurface, surfaceCoords); g_pSeatManager->sendPointerMotion(time, surfaceCoords); diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp index 83447593..4a67d2f2 100644 --- a/src/managers/input/Touch.cpp +++ b/src/managers/input/Touch.cpp @@ -61,7 +61,8 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) { } } - if (g_pSessionLockManager->isSessionLocked()) { + // could have abovelock surface, thus only use lock if no ls found + if (g_pSessionLockManager->isSessionLocked() && m_foundLSToFocus.expired()) { m_touchData.touchFocusLockSurface = g_pSessionLockManager->getSessionLockSurfaceForMonitor(PMONITOR->m_id); if (!m_touchData.touchFocusLockSurface) Debug::log(WARN, "The session is locked but can't find a lock surface");