summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorDarksome <dev@darkso.me>2022-07-16 15:28:17 +0300
committerDarksome <dev@darkso.me>2022-07-16 15:28:17 +0300
commitce9efb7ae38acb84d72035e6b4a772a6fe5e9319 (patch)
treeac6d0312df8c4aefcea6b86a2b9150927b2a1934 /src/helpers/MiscFunctions.cpp
parent2ae088d63102cf7c0281157c1845d27e3502048e (diff)
Impl changeworkspace(e+{n})
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index 126600f3..cf415847 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -193,7 +193,9 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) {
}
outName = WORKSPACENAME;
} else {
- if (in[0] == 'm') {
+ if (in[0] == 'm' || in[0] == 'e') {
+ bool onAllMonitors = in[0] == 'e';
+
if (!g_pCompositor->m_pLastMonitor) {
Debug::log(ERR, "Relative monitor workspace on monitor null!");
result = INT_MAX;
@@ -234,7 +236,7 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) {
}
if (const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(searchID); PWORKSPACE && PWORKSPACE->m_iID != SPECIAL_WORKSPACE_ID) {
- if (PWORKSPACE->m_iMonitorID == g_pCompositor->m_pLastMonitor->ID) {
+ if (onAllMonitors || PWORKSPACE->m_iMonitorID == g_pCompositor->m_pLastMonitor->ID) {
currentID = PWORKSPACE->m_iID;
if (remains < 0)