From 71ef1bde7e45f94ceaab925ae065f32f91510890 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 11 Mar 2023 17:58:34 +0000 Subject: [PATCH] dispatchers: disallow togglesplit on fullscreen --- src/managers/KeybindManager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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"); }