aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAnthony Ruhier <[email protected]>2023-05-17 14:31:03 +0200
committerGitHub <[email protected]>2023-05-17 13:31:03 +0100
commit9ef7225532a5eccb91d4c7775913ce5b51a440d9 (patch)
tree089ddced160db3c02e0fabcb9a8c8f60b12f98f8
parent642030f959efe7bd2692bf6a4236d4c1b39ee51a (diff)
downloadHyprland-9ef7225532a5eccb91d4c7775913ce5b51a440d9.tar.gz
Hyprland-9ef7225532a5eccb91d4c7775913ce5b51a440d9.zip
don't swap workspaces if monitors are the same (#2322)
Return swapActiveWorkspaces early if MON1 and MON2 are equals, to avoid buggy behavior.
-rw-r--r--src/managers/KeybindManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index a502f147..7b5a102c 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -1872,7 +1872,7 @@ void CKeybindManager::swapActiveWorkspaces(std::string args) {
const auto PMON1 = g_pCompositor->getMonitorFromString(MON1);
const auto PMON2 = g_pCompositor->getMonitorFromString(MON2);
- if (!PMON1 || !PMON2)
+ if (!PMON1 || !PMON2 || PMON1 == PMON2)
return;
g_pCompositor->swapActiveWorkspaces(PMON1, PMON2);