diff options
author | Vaxry <[email protected]> | 2024-04-03 21:57:12 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-04-06 15:16:15 +0100 |
commit | 013abd3fe33641e3b5226c071df18c0ab588b25a (patch) | |
tree | 586bee9fdb666bcbee3abccbd38c871ba62d0a87 | |
parent | 632a5c217117bedcbd59824675f028eb8556ae16 (diff) | |
download | Hyprland-013abd3fe33641e3b5226c071df18c0ab588b25a.tar.gz Hyprland-013abd3fe33641e3b5226c071df18c0ab588b25a.zip |
input: allow focus to bottom layers on maximized in reserved
-rw-r--r-- | src/managers/input/InputManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 4e2bf709..fde9b631 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -267,11 +267,18 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID); } } else { + // if we have a maximized window, allow focusing on a bar or something if in reserved area. + if (g_pCompositor->isPointOnReservedArea(mouseCoords, PMONITOR)) { + foundSurface = + g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM], &surfaceCoords, &pFoundLayerSurface); + } + pFoundWindow = g_pCompositor->vectorToWindowUnified(mouseCoords, RESERVED_EXTENTS | INPUT_EXTENTS | ALLOW_FLOATING); if (!(pFoundWindow && pFoundWindow->m_bIsFloating && pFoundWindow->m_bCreatedOverFullscreen)) pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID); } + } else { pFoundWindow = g_pCompositor->vectorToWindowUnified(mouseCoords, RESERVED_EXTENTS | INPUT_EXTENTS | ALLOW_FLOATING); } |