summaryrefslogtreecommitdiff
path: root/src/managers
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
parente90c1f7022ffd82e463c48260a97850c834f347d (diff)
Added togglesplit dispatcher
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/KeybindManager.cpp15
-rw-r--r--src/managers/KeybindManager.hpp1
2 files changed, 14 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) {
diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp
index 9737d092..7f01859a 100644
--- a/src/managers/KeybindManager.hpp
+++ b/src/managers/KeybindManager.hpp
@@ -44,6 +44,7 @@ private:
static void changeGroupActive(std::string);
static void alterSplitRatio(std::string);
static void focusMonitor(std::string);
+ static void toggleSplit(std::string);
};
inline std::unique_ptr<CKeybindManager> g_pKeybindManager; \ No newline at end of file