aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-12-08 21:24:55 +0000
committervaxerski <[email protected]>2022-12-08 21:24:55 +0000
commit726732244a5d51a0da54219174c13f4428017b79 (patch)
tree6363fc0014e4513406d5db4962f4f295f255243f
parentbe6e1a33b1d37ce3639ceb5c40fce581c77fd54a (diff)
downloadHyprland-726732244a5d51a0da54219174c13f4428017b79.tar.gz
Hyprland-726732244a5d51a0da54219174c13f4428017b79.zip
sort valid ws-es in relative
-rw-r--r--src/helpers/MiscFunctions.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index 9bd94a7c..e0dcb6dc 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -286,6 +286,8 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) {
validWSes.push_back(ws->m_iID);
}
+ std::sort(validWSes.begin(), validWSes.end());
+
// get the offset
remains = remains < 0 ? -((-remains) % validWSes.size()) : remains % validWSes.size();