diff options
author | vaxerski <[email protected]> | 2022-06-03 11:19:17 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-06-03 11:19:17 +0200 |
commit | 19b17b590c8a2dc19e79542796c7b1b8e65301de (patch) | |
tree | 049c15c9004ab8c70744537b6350accc50c2bf45 | |
parent | f9c8a72e4689869a4373ce25b2458820027881e0 (diff) | |
download | Hyprland-19b17b590c8a2dc19e79542796c7b1b8e65301de.tar.gz Hyprland-19b17b590c8a2dc19e79542796c7b1b8e65301de.zip |
fix moveactivetoworkspace with same workspace
-rw-r--r-- | src/managers/KeybindManager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index a59fbad6..82aa5575 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -337,14 +337,19 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) { if (!g_pCompositor->windowValidMapped(PWINDOW)) return; - g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW); - const auto OLDWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID); // hack std::string unusedName; const auto WORKSPACEID = getWorkspaceIDFromString(args, unusedName); + if (WORKSPACEID == PWINDOW->m_iWorkspaceID) { + Debug::log(LOG, "Not moving to workspace because it didn't change."); + return; + } + + g_pLayoutManager->getCurrentLayout()->onWindowRemoved(PWINDOW); + g_pKeybindManager->changeworkspace(args); const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(WORKSPACEID); |