summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2022-07-21 19:40:15 +0200
committerGitHub <noreply@github.com>2022-07-21 19:40:15 +0200
commita011c28227d3f2832ccf55ca2f6362b76700fe1b (patch)
treefbd6eadcba1647f83eeb7731b8a88878ff8c699e /src/helpers/MiscFunctions.cpp
parentf512bf6b5a5c003560e421a0ccf4c1adb19148f5 (diff)
parentd5ccca4fdbdf53eec011210f4bbbdb20049aa12e (diff)
Merge pull request #265 from xDarksome/main
Scroll workspaces with Super+MouseWheel
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 8f8ee0f9..3fc6d20e 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -217,7 +217,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;
@@ -258,7 +260,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)