diff options
author | Vaxry <[email protected]> | 2024-11-09 02:25:54 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-11-09 02:25:54 +0000 |
commit | 0ccc0ace88fab3969c2eca95deb1cc9b2ac0d16d (patch) | |
tree | 7cd22d9812037e19140991ace5fab27658a047a7 /src | |
parent | f43d4a86383bc8a8251987552ad5a0e51dd85868 (diff) | |
download | Hyprland-0ccc0ace88fab3969c2eca95deb1cc9b2ac0d16d.tar.gz Hyprland-0ccc0ace88fab3969c2eca95deb1cc9b2ac0d16d.zip |
input: ignore non-kb ls-es in refocusLastWindow
ref #8293
Diffstat (limited to 'src')
-rw-r--r-- | src/managers/input/InputManager.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 2787cbf7..c190f589 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -1388,13 +1388,19 @@ void CInputManager::refocusLastWindow(PHLMONITOR pMonitor) { foundSurface = m_dExclusiveLSes[m_dExclusiveLSes.size() - 1]->surface->resource(); // then any surfaces above windows on the same monitor - if (!foundSurface) + if (!foundSurface) { foundSurface = g_pCompositor->vectorToLayerSurface(g_pInputManager->getMouseCoordsInternal(), &pMonitor->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], &surfaceCoords, &pFoundLayerSurface); + if (pFoundLayerSurface && pFoundLayerSurface->interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) + foundSurface = nullptr; + } - if (!foundSurface) + if (!foundSurface) { foundSurface = g_pCompositor->vectorToLayerSurface(g_pInputManager->getMouseCoordsInternal(), &pMonitor->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], &surfaceCoords, &pFoundLayerSurface); + if (pFoundLayerSurface && pFoundLayerSurface->interactivity == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND) + foundSurface = nullptr; + } if (!foundSurface && g_pCompositor->m_pLastWindow.lock() && g_pCompositor->isWorkspaceVisibleNotCovered(g_pCompositor->m_pLastWindow->m_pWorkspace)) { // then the last focused window if we're on the same workspace as it |