diff options
author | vaxerski <[email protected]> | 2022-10-30 12:28:37 +0000 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-10-30 12:28:37 +0000 |
commit | 9f1d7f7fc709ae3360f7ec229e9fd1e32b894ace (patch) | |
tree | b6bf2bc610b3afe94713b8abc548722800f90e22 | |
parent | 6245c92bd0dbec65dbb1b2bd6d6277ba8f53fef9 (diff) | |
download | Hyprland-0.17.0beta.tar.gz Hyprland-0.17.0beta.zip |
properly scan for subsurfaces in fullscreen input refocusv0.17.0beta
-rw-r--r-- | src/managers/input/InputManager.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 27d16899..2ffc0e7c 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -157,26 +157,22 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { return; } - foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow); - surfacePos = pFoundWindow->m_vRealPosition.vec(); - // only check floating because tiled cant be over fullscreen for (auto w = g_pCompositor->m_vWindows.rbegin(); w != g_pCompositor->m_vWindows.rend(); w++) { wlr_box box = {(*w)->m_vRealPosition.vec().x, (*w)->m_vRealPosition.vec().y, (*w)->m_vRealSize.vec().x, (*w)->m_vRealSize.vec().y}; if ((((*w)->m_bIsFloating && (*w)->m_bIsMapped && ((*w)->m_bCreatedOverFullscreen || (*w)->m_bPinned)) || ((*w)->m_iWorkspaceID == SPECIAL_WORKSPACE_ID && PMONITOR->specialWorkspaceOpen)) && wlr_box_contains_point(&box, mouseCoords.x, mouseCoords.y) && g_pCompositor->isWorkspaceVisible((*w)->m_iWorkspaceID) && !(*w)->isHidden()) { pFoundWindow = (*w).get(); - - if (!pFoundWindow->m_bIsX11) { - foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords); - surfacePos = Vector2D(-1337, -1337); - } else { - foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow); - surfacePos = pFoundWindow->m_vRealPosition.vec(); - } - break; } } + + if (!pFoundWindow->m_bIsX11) { + foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords); + surfacePos = Vector2D(-1337, -1337); + } else { + foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow); + surfacePos = pFoundWindow->m_vRealPosition.vec(); + } } // then windows |