keybinds: more intelligent fallback on silent move

This commit is contained in:
vaxerski 2023-04-14 01:42:55 +01:00
parent 70eb74c356
commit 011600ac6e

View file

@ -1144,8 +1144,8 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) {
if (PNEXTCANDIDATE) if (PNEXTCANDIDATE)
g_pCompositor->focusWindow(PNEXTCANDIDATE); g_pCompositor->focusWindow(PNEXTCANDIDATE);
else if (const auto PFIRSTONWS = g_pCompositor->getFirstWindowOnWorkspace(OLDWORKSPACEIDRETURN); PFIRSTONWS) else if (const auto PWINDOWATLAST = g_pCompositor->vectorToWindowIdeal(PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f); PWINDOWATLAST)
g_pCompositor->focusWindow(PFIRSTONWS); g_pCompositor->focusWindow(PWINDOWATLAST);
else else
g_pInputManager->refocus(); g_pInputManager->refocus();
} }