diff options
author | vaxerski <[email protected]> | 2022-04-21 21:35:08 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-04-21 21:35:08 +0200 |
commit | c16ebec3b2a798120a347de170fc22bc6e61b1dd (patch) | |
tree | 721298111dd6722387cae26b97de8fd382011bbb /src/Compositor.cpp | |
parent | 727851d6e2c2b1023fe530ac57e2aba19c87a193 (diff) | |
download | Hyprland-c16ebec3b2a798120a347de170fc22bc6e61b1dd.tar.gz Hyprland-c16ebec3b2a798120a347de170fc22bc6e61b1dd.zip |
count down in named workspace IDs
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r-- | src/Compositor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 0a0a55e4..94d04129 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -711,13 +711,13 @@ CWindow* CCompositor::getNextWindowOnWorkspace(CWindow* pWindow) { } int CCompositor::getNextAvailableNamedWorkspace() { - int highest = -1337 - 1; + int lowest = -1337 + 1; for (auto& w : m_lWorkspaces) { - if (w.m_iID < 0 && w.m_iID > highest) - highest = w.m_iID; + if (w.m_iID < 0 && w.m_iID < lowest) + lowest = w.m_iID; } - return highest + 1; + return lowest - 1; } CWorkspace* CCompositor::getWorkspaceByName(const std::string& name) { |