diff options
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
| -rw-r--r-- | src/layout/IHyprLayout.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index b0c1d50c..5466282f 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -535,12 +535,22 @@ CWindow* IHyprLayout::getNextWindowCandidate(CWindow* pWindow) { return PWINDOWCANDIDATE; } -void IHyprLayout::requestFocusForWindow(CWindow* pWindow) { +bool IHyprLayout::isWindowReachable(CWindow* pWindow) { + return pWindow && (!pWindow->isHidden() || pWindow->m_sGroupData.pNextWindow); +} + +void IHyprLayout::bringWindowToTop(CWindow* pWindow) { + if (pWindow == nullptr) + return; + if (pWindow->isHidden() && pWindow->m_sGroupData.pNextWindow) { // grouped, change the current to this window pWindow->setGroupCurrent(pWindow); } +} +void IHyprLayout::requestFocusForWindow(CWindow* pWindow) { + bringWindowToTop(pWindow); g_pCompositor->focusWindow(pWindow); } |
