allow focus to grouped windows

This commit is contained in:
Vaxry 2023-02-28 12:34:59 +00:00
parent 49f423aa8f
commit ac251d7a66
2 changed files with 6 additions and 1 deletions

View file

@ -2050,7 +2050,7 @@ CWindow* CCompositor::getWindowByRegex(const std::string& regexp) {
} }
for (auto& w : g_pCompositor->m_vWindows) { for (auto& w : g_pCompositor->m_vWindows) {
if (!w->m_bIsMapped || w->isHidden()) if (!w->m_bIsMapped || (w->isHidden() && !w->m_sGroupData.pNextWindow))
continue; continue;
switch (mode) { switch (mode) {

View file

@ -1770,6 +1770,11 @@ void CKeybindManager::focusWindow(std::string regexp) {
Debug::log(LOG, "Focusing to window name: %s", PWINDOW->m_szTitle.c_str()); Debug::log(LOG, "Focusing to window name: %s", PWINDOW->m_szTitle.c_str());
if (PWINDOW->isHidden() && PWINDOW->m_sGroupData.pNextWindow) {
// grouped, change the current to us
PWINDOW->setGroupCurrent(PWINDOW);
}
g_pCompositor->focusWindow(PWINDOW); g_pCompositor->focusWindow(PWINDOW);
const auto MIDPOINT = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f; const auto MIDPOINT = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f;