summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-03-11 17:58:34 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-03-11 17:58:34 +0000
commit71ef1bde7e45f94ceaab925ae065f32f91510890 (patch)
tree1af8ef1350c4b66d4b1d68814d6d71f8cf2316e0 /src/managers/KeybindManager.cpp
parent253286669a115c4e63c3924eeec8391af2504c57 (diff)
dispatchers: disallow togglesplit on fullscreen
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 0dadcddd..fca98114 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -1340,6 +1340,15 @@ void CKeybindManager::changeGroupActive(std::string args) {
void CKeybindManager::toggleSplit(std::string args) {
SLayoutMessageHeader header;
header.pWindow = g_pCompositor->m_pLastWindow;
+
+ if (!header.pWindow)
+ return;
+
+ const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(header.pWindow->m_iWorkspaceID);
+
+ if (PWORKSPACE->m_bHasFullscreenWindow)
+ return;
+
g_pLayoutManager->getCurrentLayout()->layoutMessage(header, "togglesplit");
}