diff options
| author | vaxerski <vaxry@vaxry.net> | 2025-01-19 15:39:19 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2025-01-19 16:11:12 +0100 |
| commit | 8dd2cd41fb4c5a5eb6886cc190419b36084cabfa (patch) | |
| tree | 713dfeb4f2bf75c2a04ed93166b5f9109dac9a84 /src/plugins/PluginAPI.cpp | |
| parent | 0a0e56d99c3b5f900ec561b3fe9a3c8a64fe1217 (diff) | |
core: move to inotify for monitoring the config files
instead of manually polling every second which is not efficient, use inotify.
an added bonus is that inotify is much much faster
Diffstat (limited to 'src/plugins/PluginAPI.cpp')
| -rw-r--r-- | src/plugins/PluginAPI.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/PluginAPI.cpp b/src/plugins/PluginAPI.cpp index b6bbc460..fbb1ec1b 100644 --- a/src/plugins/PluginAPI.cpp +++ b/src/plugins/PluginAPI.cpp @@ -4,6 +4,7 @@ #include "../plugins/PluginSystem.hpp" #include "../managers/HookSystemManager.hpp" #include "../managers/LayoutManager.hpp" +#include "../managers/eventLoop/EventLoopManager.hpp" #include "../config/ConfigManager.hpp" #include "../debug/HyprNotificationOverlay.hpp" #include <dlfcn.h> @@ -72,7 +73,7 @@ APICALL bool HyprlandAPI::removeLayout(HANDLE handle, IHyprLayout* layout) { } APICALL bool HyprlandAPI::reloadConfig() { - g_pConfigManager->m_bForceReload = true; + g_pEventLoopManager->doLater([] { g_pConfigManager->reload(); }); return true; } |
