diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-06 15:18:58 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-06 15:18:58 +0100 |
| commit | f081a4300fc99b0bcd821a1b391364443db424cf (patch) | |
| tree | 9330c98dd3f66ab8ff794a4ff261d48f0d1571d2 /src/managers/input/InputManager.cpp | |
| parent | 159444c45b6fa87d250cf694233ce0213a4585bd (diff) | |
input: fixup background layer checking on maximized
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index f5f5eae5..fa2aba3d 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -259,13 +259,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { // then windows if (!foundSurface) { if (PWORKSPACE->m_bHasFullscreenWindow && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_MAXIMIZED) { - - // 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); - } - if (!foundSurface) { if (PMONITOR->activeSpecialWorkspace) { pFoundWindow = g_pCompositor->vectorToWindowUnified(mouseCoords, RESERVED_EXTENTS | INPUT_EXTENTS | ALLOW_FLOATING); @@ -274,6 +267,12 @@ 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)) |
