mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-01 15:48:30 +00:00
better keyboard window switching
This commit is contained in:
@@ -649,4 +649,27 @@ void CCompositor::deactivateAllWLRWorkspaces() {
|
||||
if (w.m_pWlrHandle)
|
||||
wlr_ext_workspace_handle_v1_set_active(w.m_pWlrHandle, false);
|
||||
}
|
||||
}
|
||||
|
||||
CWindow* CCompositor::getNextWindowOnWorkspace(CWindow* pWindow) {
|
||||
bool gotToWindow = false;
|
||||
for (auto& w : m_lWindows) {
|
||||
if (&w != pWindow && !gotToWindow)
|
||||
continue;
|
||||
|
||||
if (&w == pWindow) {
|
||||
gotToWindow = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (w.m_iWorkspaceID == pWindow->m_iWorkspaceID && windowValidMapped(&w))
|
||||
return &w;
|
||||
}
|
||||
|
||||
for (auto& w : m_lWindows) {
|
||||
if (&w != pWindow && w.m_iWorkspaceID == pWindow->m_iWorkspaceID && windowValidMapped(&w))
|
||||
return &w;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
Reference in New Issue
Block a user