summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-13 22:21:11 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-13 22:21:11 +0100
commit260ef788f55cdbccd3c32f57d4eeb4e37dc44aaf (patch)
treee5b7de8731361c287d0f53bb42b3513b2cc380a5
parent6131e0bef71b67b6ba5d1b395da2f3a4c2082551 (diff)
internal: don't sanity check workspaces on internal ws calls
-rw-r--r--src/Compositor.cpp6
-rw-r--r--src/managers/KeybindManager.cpp3
2 files changed, 3 insertions, 6 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index a2a82b4e..55f9e0b4 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1888,12 +1888,8 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with existing %d", nextWorkspaceOnMonitorID);
- pWorkspace->m_bIndestructible = true; // so that changeworkspace doesn't yeet it if it's empty
-
g_pKeybindManager->focusMonitor(std::to_string(POLDMON->ID));
- g_pKeybindManager->changeworkspace(std::to_string(nextWorkspaceOnMonitorID));
-
- pWorkspace->m_bIndestructible = false;
+ g_pKeybindManager->changeworkspace("[internal]" + std::to_string(nextWorkspaceOnMonitorID));
// move the workspace
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index a04f67b9..cdb9a637 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -961,7 +961,8 @@ void CKeybindManager::changeworkspace(std::string args) {
g_pCompositor->warpCursorTo(PMONITOR->vecPosition + PMONITOR->vecSize / 2.f);
// Destroy old workspace if it is empty
- g_pCompositor->sanityCheckWorkspaces();
+ if (!internal)
+ g_pCompositor->sanityCheckWorkspaces();
Debug::log(LOG, "Changed to workspace %i", workspaceToChangeTo);
}