aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-05-30 14:18:46 +0200
committervaxerski <[email protected]>2022-05-30 14:18:46 +0200
commit7167be9c482760c81f70153f4457f60cca4e9c80 (patch)
treec31ba4c6000ddece2fae693eec644fceb44eea3d
parente81790f357e387515467761f0bc3c032a1bb771f (diff)
downloadHyprland-7167be9c482760c81f70153f4457f60cca4e9c80.tar.gz
Hyprland-7167be9c482760c81f70153f4457f60cca4e9c80.zip
Fix relative IDs in movetoworkspace crashing
-rw-r--r--src/Compositor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 29e2f188..0b60369d 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -820,8 +820,8 @@ CWorkspace* CCompositor::getWorkspaceByString(const std::string& str) {
}
try {
- int id = std::stoi(str);
- return getWorkspaceByID(id);
+ std::string name = "";
+ return getWorkspaceByID(getWorkspaceIDFromString(str, name));
} catch (std::exception& e) {
Debug::log(ERR, "Error in getWorkspaceByString, invalid id");
}