summaryrefslogtreecommitdiff
path: root/src/managers
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-30 15:28:23 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-30 15:28:23 +0200
commit1e096f6fcd514b6e2c9d5dbd2b1bbcbcb3c9b4a5 (patch)
tree9aaabe8d09fc76affc66073aa744dac5144c00b4 /src/managers
parentb1c11f3d2e3db739742ea94d59ecbfe7878d1cd3 (diff)
fix moveactivetoworkspace
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/KeybindManager.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 62b91814..5f692ecc 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -318,15 +318,23 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) {
const auto OLDWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID);
// hack
+ std::string unusedName;
+ const auto WORKSPACEID = getWorkspaceIDFromString(args, unusedName);
+
g_pKeybindManager->changeworkspace(args);
- const auto PWORKSPACE = g_pCompositor->getWorkspaceByString(args);
+ const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(WORKSPACEID);
if (PWORKSPACE == OLDWORKSPACE) {
Debug::log(LOG, "Not moving to workspace because it didn't change.");
return;
}
+ if (!PWORKSPACE) {
+ Debug::log(ERR, "Workspace null in moveActiveToWorkspace?");
+ return;
+ }
+
OLDWORKSPACE->m_bHasFullscreenWindow = false;
PWINDOW->m_iWorkspaceID = PWORKSPACE->m_iID;