mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 10:25:58 +01:00
properly scan for subsurfaces in fullscreen input refocus
This commit is contained in:
parent
6245c92bd0
commit
9f1d7f7fc7
1 changed files with 8 additions and 12 deletions
|
@ -157,14 +157,14 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow);
|
|
||||||
surfacePos = pFoundWindow->m_vRealPosition.vec();
|
|
||||||
|
|
||||||
// only check floating because tiled cant be over fullscreen
|
// only check floating because tiled cant be over fullscreen
|
||||||
for (auto w = g_pCompositor->m_vWindows.rbegin(); w != g_pCompositor->m_vWindows.rend(); w++) {
|
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};
|
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()) {
|
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();
|
pFoundWindow = (*w).get();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!pFoundWindow->m_bIsX11) {
|
if (!pFoundWindow->m_bIsX11) {
|
||||||
foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);
|
foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);
|
||||||
|
@ -173,10 +173,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow);
|
foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow);
|
||||||
surfacePos = pFoundWindow->m_vRealPosition.vec();
|
surfacePos = pFoundWindow->m_vRealPosition.vec();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// then windows
|
// then windows
|
||||||
|
|
Loading…
Reference in a new issue