From 4e79e83405c8234a943da1004446e3e281895d73 Mon Sep 17 00:00:00 2001 From: Bartkk Date: Sat, 13 Jul 2024 12:41:15 +0200 Subject: [PATCH] feat: dispatchers, add hidespecialworkspace --- src/managers/KeybindManager.cpp | 6 ++++++ src/managers/KeybindManager.hpp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index eb8a3232a7d..0d8fd6f97f3 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -87,6 +87,7 @@ CKeybindManager::CKeybindManager() { m_mDispatchers["focusworkspaceoncurrentmonitor"] = focusWorkspaceOnCurrentMonitor; m_mDispatchers["moveworkspacetomonitor"] = moveWorkspaceToMonitor; m_mDispatchers["togglespecialworkspace"] = toggleSpecialWorkspace; + m_mDispatchers["hidespecialworkspace"] = hideSpecialWorkspace; m_mDispatchers["forcerendererreload"] = forceRendererReload; m_mDispatchers["resizeactive"] = resizeActive; m_mDispatchers["moveactive"] = moveActive; @@ -1796,6 +1797,11 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) { } } +void CKeybindManager::hideSpecialWorkspace(std::string args) { + const auto PMONITOR = g_pCompositor->m_pLastMonitor; + PMONITOR->setSpecialWorkspace(nullptr); +} + void CKeybindManager::forceRendererReload(std::string args) { bool overAgain = false; diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index 2a2567609e3..a1886068426 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -176,6 +176,7 @@ class CKeybindManager { static void moveWorkspaceToMonitor(std::string); static void focusWorkspaceOnCurrentMonitor(std::string); static void toggleSpecialWorkspace(std::string); + static void hideSpecialWorkspace(std::string); static void forceRendererReload(std::string); static void resizeActive(std::string); static void moveActive(std::string);