summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-07 19:01:42 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-07 19:01:42 +0200
commita7b595d9684814285bd71089f500f60b351a00f2 (patch)
tree10c469f5802f2bcd484bbe289ea784676c279293 /src/managers/KeybindManager.cpp
parent05736bc1e3c4fdc3bb5fa77db6322dee1a375210 (diff)
allow windowrule special again
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index d33cd0b6..7f9bb39a 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -898,7 +898,12 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
}
} else {
auto PSPECIALWORKSPACE = g_pCompositor->getWorkspaceByID(SPECIAL_WORKSPACE_ID);
-
+
+ if (!PSPECIALWORKSPACE) {
+ // ??? happens sometimes...?
+ PSPECIALWORKSPACE = g_pCompositor->m_vWorkspaces.emplace_back(std::make_unique<CWorkspace>(g_pCompositor->m_pLastMonitor->ID, "special", true)).get();
+ }
+
g_pCompositor->m_pLastMonitor->specialWorkspaceOpen = true;
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(g_pCompositor->m_pLastMonitor->ID);