keybinds: add custom event dispatcher

fixes #3439
This commit is contained in:
Vaxry 2024-06-15 16:20:00 +02:00
parent df0c014ba0
commit 32aca88752
2 changed files with 6 additions and 0 deletions

View file

@ -114,6 +114,7 @@ CKeybindManager::CKeybindManager() {
m_mDispatchers["movewindoworgroup"] = moveWindowOrGroup; m_mDispatchers["movewindoworgroup"] = moveWindowOrGroup;
m_mDispatchers["setignoregrouplock"] = setIgnoreGroupLock; m_mDispatchers["setignoregrouplock"] = setIgnoreGroupLock;
m_mDispatchers["denywindowfromgroup"] = denyWindowFromGroup; m_mDispatchers["denywindowfromgroup"] = denyWindowFromGroup;
m_mDispatchers["event"] = event;
m_mDispatchers["global"] = global; m_mDispatchers["global"] = global;
m_tScrollTimer.reset(); m_tScrollTimer.reset();
@ -2680,3 +2681,7 @@ void CKeybindManager::moveGroupWindow(std::string args) {
PLASTWINDOW->updateWindowDecos(); PLASTWINDOW->updateWindowDecos();
} }
void CKeybindManager::event(std::string args) {
g_pEventManager->postEvent(SHyprIPCEvent{"custom", args});
}

View file

@ -205,6 +205,7 @@ class CKeybindManager {
static void setIgnoreGroupLock(std::string); static void setIgnoreGroupLock(std::string);
static void denyWindowFromGroup(std::string); static void denyWindowFromGroup(std::string);
static void global(std::string); static void global(std::string);
static void event(std::string);
friend class CCompositor; friend class CCompositor;
friend class CInputManager; friend class CInputManager;