From 60bda7ee3d0a77d19277540cce53ecbddeabd716 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 5 Feb 2024 01:56:38 +0000 Subject: pluginapi: allow registering hyprctl commands closes #4616 --- src/plugins/PluginSystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/PluginSystem.cpp') diff --git a/src/plugins/PluginSystem.cpp b/src/plugins/PluginSystem.cpp index 1468cb79..44b4de1f 100644 --- a/src/plugins/PluginSystem.cpp +++ b/src/plugins/PluginSystem.cpp @@ -113,6 +113,10 @@ void CPluginSystem::unloadPlugin(const CPlugin* plugin, bool eject) { for (auto& d : rdi) HyprlandAPI::removeDispatcher(plugin->m_pHandle, d); + const auto rhc = plugin->registeredHyprctlCommands; + for (auto& c : rhc) + HyprlandAPI::unregisterHyprCtlCommand(plugin->m_pHandle, c); + g_pConfigManager->removePluginConfig(plugin->m_pHandle); dlclose(plugin->m_pHandle); -- cgit v1.2.3