mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-17 00:22:07 +01:00
fix refocus on no window
This commit is contained in:
parent
6cae44e2c0
commit
f9e30e985c
1 changed files with 6 additions and 1 deletions
|
@ -182,9 +182,14 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
if (!(pFoundWindow && pFoundWindow->m_bIsFloating && pFoundWindow->m_bCreatedOverFullscreen))
|
if (!(pFoundWindow && pFoundWindow->m_bIsFloating && pFoundWindow->m_bCreatedOverFullscreen))
|
||||||
pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
|
pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID);
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords);
|
pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords);
|
||||||
|
|
||||||
|
if (refocus && !pFoundWindow) {
|
||||||
|
pFoundWindow = g_pCompositor->getFirstWindowOnWorkspace(PMONITOR->activeWorkspace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (pFoundWindow) {
|
if (pFoundWindow) {
|
||||||
if (!pFoundWindow->m_bIsX11) {
|
if (!pFoundWindow->m_bIsX11) {
|
||||||
foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);
|
foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);
|
||||||
|
|
Loading…
Add table
Reference in a new issue