From 9ef7225532a5eccb91d4c7775913ce5b51a440d9 Mon Sep 17 00:00:00 2001 From: Anthony Ruhier Date: Wed, 17 May 2023 14:31:03 +0200 Subject: [PATCH] don't swap workspaces if monitors are the same (#2322) Return swapActiveWorkspaces early if MON1 and MON2 are equals, to avoid buggy behavior. --- src/managers/KeybindManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);