mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 07:29:48 +01:00
count down in named workspace IDs
This commit is contained in:
parent
727851d6e2
commit
c16ebec3b2
1 changed files with 4 additions and 4 deletions
|
@ -711,13 +711,13 @@ CWindow* CCompositor::getNextWindowOnWorkspace(CWindow* pWindow) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int CCompositor::getNextAvailableNamedWorkspace() {
|
int CCompositor::getNextAvailableNamedWorkspace() {
|
||||||
int highest = -1337 - 1;
|
int lowest = -1337 + 1;
|
||||||
for (auto& w : m_lWorkspaces) {
|
for (auto& w : m_lWorkspaces) {
|
||||||
if (w.m_iID < 0 && w.m_iID > highest)
|
if (w.m_iID < 0 && w.m_iID < lowest)
|
||||||
highest = w.m_iID;
|
lowest = w.m_iID;
|
||||||
}
|
}
|
||||||
|
|
||||||
return highest + 1;
|
return lowest - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CWorkspace* CCompositor::getWorkspaceByName(const std::string& name) {
|
CWorkspace* CCompositor::getWorkspaceByName(const std::string& name) {
|
||||||
|
|
Loading…
Reference in a new issue