From 011600ac6e7f6d52f69d0890bffba519a9d81e3f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 14 Apr 2023 01:42:55 +0100 Subject: [PATCH] keybinds: more intelligent fallback on silent move --- src/managers/KeybindManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index cdb9a637..4d8cb238 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1144,8 +1144,8 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) { if (PNEXTCANDIDATE) g_pCompositor->focusWindow(PNEXTCANDIDATE); - else if (const auto PFIRSTONWS = g_pCompositor->getFirstWindowOnWorkspace(OLDWORKSPACEIDRETURN); PFIRSTONWS) - g_pCompositor->focusWindow(PFIRSTONWS); + else if (const auto PWINDOWATLAST = g_pCompositor->vectorToWindowIdeal(PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f); PWINDOWATLAST) + g_pCompositor->focusWindow(PWINDOWATLAST); else g_pInputManager->refocus(); }