From 013abd3fe33641e3b5226c071df18c0ab588b25a Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 3 Apr 2024 21:57:12 +0100 Subject: [PATCH] input: allow focus to bottom layers on maximized in reserved --- src/managers/input/InputManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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); }