diff --git a/src/Compositor.cpp b/src/Compositor.cpp index f2fcceff..ab38bd09 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -832,6 +832,11 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { return; } + if (pWindow && pWindow->isHidden() && pWindow->m_sGroupData.pNextWindow) { + // grouped, change the current to us + pWindow->setGroupCurrent(pWindow); + } + if (!pWindow || !windowValidMapped(pWindow)) { const auto PLASTWINDOW = m_pLastWindow; m_pLastWindow = nullptr; diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index f54e1e5f..6956c697 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1712,11 +1712,6 @@ void CKeybindManager::focusWindow(std::string regexp) { changeworkspace(PWORKSPACE->getConfigName()); } - if (PWINDOW->isHidden() && PWINDOW->m_sGroupData.pNextWindow) { - // grouped, change the current to us - PWINDOW->setGroupCurrent(PWINDOW); - } - g_pCompositor->focusWindow(PWINDOW); const auto MIDPOINT = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f;