diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-02-28 12:34:59 +0000 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-02-28 12:34:59 +0000 |
| commit | ac251d7a66ec3cbd18c15f29c4f54d33d54f1b13 (patch) | |
| tree | 13c14559fd0166f83447b80b95b9c51d0038f015 /src | |
| parent | 49f423aa8f9b6e063c7806098a9b6b43a7978c02 (diff) | |
allow focus to grouped windows
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compositor.cpp | 2 | ||||
| -rw-r--r-- | src/managers/KeybindManager.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index fe81196c..9346dd9c 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2050,7 +2050,7 @@ CWindow* CCompositor::getWindowByRegex(const std::string& regexp) { } for (auto& w : g_pCompositor->m_vWindows) { - if (!w->m_bIsMapped || w->isHidden()) + if (!w->m_bIsMapped || (w->isHidden() && !w->m_sGroupData.pNextWindow)) continue; switch (mode) { diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 339a3016..f97347f6 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1770,6 +1770,11 @@ void CKeybindManager::focusWindow(std::string regexp) { 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); const auto MIDPOINT = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f; |
