summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-16 17:37:46 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-16 17:37:46 +0200
commit50f978e518c83872a25a47b5ddde310ec24ac203 (patch)
treee7632acf6ea22eae66fd1262e834212ff197fdf4 /src/managers/KeybindManager.cpp
parente90c1f7022ffd82e463c48260a97850c834f347d (diff)
Added togglesplit dispatcher
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index c41f552a..e58819d8 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -14,6 +14,7 @@ CKeybindManager::CKeybindManager() {
m_mDispatchers["movewindow"] = moveActiveTo;
m_mDispatchers["togglegroup"] = toggleGroup;
m_mDispatchers["changegroupactive"] = changeGroupActive;
+ m_mDispatchers["togglesplit"] = toggleSplit;
m_mDispatchers["splitratio"] = alterSplitRatio;
m_mDispatchers["focusmonitor"] = focusMonitor;
}
@@ -432,11 +433,21 @@ void CKeybindManager::moveActiveTo(std::string args) {
}
void CKeybindManager::toggleGroup(std::string args) {
- g_pLayoutManager->getCurrentLayout()->toggleWindowGroup(g_pCompositor->m_pLastWindow);
+ SLayoutMessageHeader header;
+ header.pWindow = g_pCompositor->m_pLastWindow;
+ g_pLayoutManager->getCurrentLayout()->layoutMessage(header, "togglegroup");
}
void CKeybindManager::changeGroupActive(std::string args) {
- g_pLayoutManager->getCurrentLayout()->switchGroupWindow(g_pCompositor->m_pLastWindow);
+ SLayoutMessageHeader header;
+ header.pWindow = g_pCompositor->m_pLastWindow;
+ g_pLayoutManager->getCurrentLayout()->layoutMessage(header, "changegroupactive");
+}
+
+void CKeybindManager::toggleSplit(std::string args) {
+ SLayoutMessageHeader header;
+ header.pWindow = g_pCompositor->m_pLastWindow;
+ g_pLayoutManager->getCurrentLayout()->layoutMessage(header, "togglesplit");
}
void CKeybindManager::alterSplitRatio(std::string args) {