Added togglesplit dispatcher

This commit is contained in:
vaxerski
2022-05-16 17:37:46 +02:00
parent e90c1f7022
commit 50f978e518
5 changed files with 46 additions and 13 deletions

View File

@@ -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) {