added cyclenext param previous
This commit is contained in:
parent
ddc4cbbd7e
commit
c44cafda97
3 changed files with 29 additions and 2 deletions
|
|
@ -938,6 +938,29 @@ CWindow* CCompositor::getNextWindowOnWorkspace(CWindow* pWindow) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
CWindow* CCompositor::getPrevWindowOnWorkspace(CWindow* pWindow) {
|
||||
bool gotToWindow = false;
|
||||
for (auto it = m_vWindows.rbegin(); it != m_vWindows.rend(); it++) {
|
||||
if (it->get() != pWindow && !gotToWindow)
|
||||
continue;
|
||||
|
||||
if (it->get() == pWindow) {
|
||||
gotToWindow = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((*it)->m_iWorkspaceID == pWindow->m_iWorkspaceID && (*it)->m_bIsMapped && !(*it)->m_bHidden)
|
||||
return it->get();
|
||||
}
|
||||
|
||||
for (auto it = m_vWindows.rbegin(); it != m_vWindows.rend(); it++) {
|
||||
if (it->get() != pWindow && (*it)->m_iWorkspaceID == pWindow->m_iWorkspaceID && (*it)->m_bIsMapped && !(*it)->m_bHidden)
|
||||
return it->get();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int CCompositor::getNextAvailableNamedWorkspace() {
|
||||
int lowest = -1337 + 1;
|
||||
for (auto& w : m_vWorkspaces) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue