diff options
author | Anthony Ruhier <[email protected]> | 2023-05-17 14:31:03 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-05-17 13:31:03 +0100 |
commit | 9ef7225532a5eccb91d4c7775913ce5b51a440d9 (patch) | |
tree | 089ddced160db3c02e0fabcb9a8c8f60b12f98f8 | |
parent | 642030f959efe7bd2692bf6a4236d4c1b39ee51a (diff) | |
download | Hyprland-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.cpp | 2 |
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); |