keybinds: refocus properly on silent move

This commit is contained in:
vaxerski 2023-04-13 22:20:31 +01:00
parent 41c7d896e3
commit 6131e0bef7

View File

@ -1141,7 +1141,12 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) {
const auto PNEXTCANDIDATE = g_pLayoutManager->getCurrentLayout()->getNextWindowCandidate(PWINDOW);
PWINDOW->m_iWorkspaceID = workspaceToMoveTo;
g_pCompositor->focusWindow(PNEXTCANDIDATE);
if (PNEXTCANDIDATE)
g_pCompositor->focusWindow(PNEXTCANDIDATE);
else if (const auto PFIRSTONWS = g_pCompositor->getFirstWindowOnWorkspace(OLDWORKSPACEIDRETURN); PFIRSTONWS)
g_pCompositor->focusWindow(PFIRSTONWS);
else
g_pInputManager->refocus();
}
void CKeybindManager::moveFocusTo(std::string args) {