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/managers/ThreadManager.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/managers/ThreadManager.cpp')
| -rw-r--r-- | src/managers/ThreadManager.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/managers/ThreadManager.cpp b/src/managers/ThreadManager.cpp deleted file mode 100644 index bd124c99..00000000 --- a/src/managers/ThreadManager.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "ThreadManager.hpp" -#include "../debug/HyprCtl.hpp" -#include "../Compositor.hpp" -#include "../config/ConfigValue.hpp" - -static int handleTimer(void* data) { - const auto PTM = (CThreadManager*)data; - - static auto PDISABLECFGRELOAD = CConfigValue<Hyprlang::INT>("misc:disable_autoreload"); - - if (*PDISABLECFGRELOAD != 1) - g_pConfigManager->tick(); - - wl_event_source_timer_update(PTM->m_esConfigTimer, 1000); - - return 0; -} - -CThreadManager::CThreadManager() : m_esConfigTimer(wl_event_loop_add_timer(g_pCompositor->m_sWLEventLoop, handleTimer, this)) { - wl_event_source_timer_update(m_esConfigTimer, 1000); -} - -CThreadManager::~CThreadManager() { - if (m_esConfigTimer) - wl_event_source_remove(m_esConfigTimer); -} |
