diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-05-18 19:34:14 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-05-18 19:34:20 +0200 |
| commit | d9c8a378118d954932eb9906b07150ccd9a3a434 (patch) | |
| tree | 018b2532fbde016d1791467ae77d3c1196819f63 /src/managers/input/InputManager.cpp | |
| parent | 158c0f2911894f5f97af7361f639f97f6d100c82 (diff) | |
input: always allow focus to permission popups
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index f9f36cf2..2d50dbcf 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -250,7 +250,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { if (PMONITOR != g_pCompositor->m_lastMonitor && (*PMOUSEFOCUSMON || refocus) && m_forcedFocus.expired()) g_pCompositor->setActiveMonitor(PMONITOR); - if (g_pSessionLockManager->isSessionLocked()) { + // check for windows that have focus priority like our permission popups + pFoundWindow = g_pCompositor->vectorToWindowUnified(mouseCoords, FOCUS_PRIORITY); + if (pFoundWindow) + foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords); + + if (!foundSurface && g_pSessionLockManager->isSessionLocked()) { // set keyboard focus on session lock surface regardless of layers const auto PSESSIONLOCKSURFACE = g_pSessionLockManager->getSessionLockSurfaceForMonitor(PMONITOR->m_id); @@ -288,7 +293,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) { if (!forcedFocus) forcedFocus = g_pCompositor->getForceFocus(); - if (forcedFocus) { + if (forcedFocus && !foundSurface) { pFoundWindow = forcedFocus; surfacePos = pFoundWindow->m_realPosition->value(); foundSurface = pFoundWindow->m_wlSurface->resource(); |
