aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/plugins/PluginAPI.cpp
diff options
context:
space:
mode:
authorIkalco <[email protected]>2024-08-24 11:45:53 -0500
committerGitHub <[email protected]>2024-08-24 18:45:53 +0200
commit66586c38f53f16bcf762f019359a3c9042546a72 (patch)
tree9a1f3b8b7796bd06765d32ec0f12d7298df59bf1 /src/plugins/PluginAPI.cpp
parent82c67e61a96b23c7b962ab8e3ed9079f671942e1 (diff)
downloadHyprland-66586c38f53f16bcf762f019359a3c9042546a72.tar.gz
Hyprland-66586c38f53f16bcf762f019359a3c9042546a72.zip
keybinds: refactor dispatchers to be better (#7331)
Diffstat (limited to 'src/plugins/PluginAPI.cpp')
-rw-r--r--src/plugins/PluginAPI.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/PluginAPI.cpp b/src/plugins/PluginAPI.cpp
index 098e3f12..398d4ce1 100644
--- a/src/plugins/PluginAPI.cpp
+++ b/src/plugins/PluginAPI.cpp
@@ -194,7 +194,10 @@ APICALL bool HyprlandAPI::addDispatcher(HANDLE handle, const std::string& name,
PLUGIN->registeredDispatchers.push_back(name);
- g_pKeybindManager->m_mDispatchers[name] = handler;
+ g_pKeybindManager->m_mDispatchers[name] = [handler](std::string arg1) -> SDispatchResult {
+ handler(arg1);
+ return {};
+ };
return true;
}
@@ -378,4 +381,4 @@ APICALL bool HyprlandAPI::unregisterHyprCtlCommand(HANDLE handle, SP<SHyprCtlCom
g_pHyprCtl->unregisterCommand(cmd);
return true;
-} \ No newline at end of file
+}