summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 9614774a..81a2aaf5 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -1515,12 +1515,8 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
return;
}
- if (g_pCompositor->getWindowsOnWorkspace(workspaceID) == 0) {
- Debug::log(LOG, "Can't open empty special workspace!");
- return;
- }
-
bool requestedWorkspaceIsAlreadyOpen = false;
+ bool requestedWorkspaceExists = g_pCompositor->getWorkspaceByID(workspaceID);
const auto PMONITOR = *PFOLLOWMOUSE == 1 ? g_pCompositor->getMonitorFromCursor() : g_pCompositor->m_pLastMonitor;
int specialOpenOnMonitor = PMONITOR->specialWorkspaceID;
@@ -1566,10 +1562,8 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
// not open anywhere
auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(workspaceID);
- if (!PSPECIALWORKSPACE) {
- // ??? happens sometimes...?
+ if (!PSPECIALWORKSPACE)
PSPECIALWORKSPACE = g_pCompositor->createNewWorkspace(workspaceID, PMONITOR->ID, workspaceName);
- }
PMONITOR->setSpecialWorkspace(PSPECIALWORKSPACE);
}