2022-03-18 20:03:39 +01:00
|
|
|
#include "ThreadManager.hpp"
|
2022-03-20 16:51:14 +01:00
|
|
|
#include "../debug/HyprCtl.hpp"
|
2022-07-21 12:33:22 +02:00
|
|
|
#include "../Compositor.hpp"
|
2022-03-17 15:53:45 +01:00
|
|
|
|
2022-07-21 12:33:22 +02:00
|
|
|
int slowUpdate = 0;
|
2022-03-17 15:53:45 +01:00
|
|
|
|
2022-07-21 12:33:22 +02:00
|
|
|
int handleTimer(void* data) {
|
2022-12-16 18:17:31 +01:00
|
|
|
const auto PTM = (CThreadManager*)data;
|
2022-03-17 15:53:45 +01:00
|
|
|
|
2022-12-16 18:17:31 +01:00
|
|
|
static auto* const PDISABLECFGRELOAD = &g_pConfigManager->getConfigValuePtr("misc:disable_autoreload")->intValue;
|
2022-09-10 17:28:41 +02:00
|
|
|
|
|
|
|
if (*PDISABLECFGRELOAD != 1)
|
|
|
|
g_pConfigManager->tick();
|
2022-03-17 15:53:45 +01:00
|
|
|
|
2022-07-21 12:33:22 +02:00
|
|
|
wl_event_source_timer_update(PTM->m_esConfigTimer, 1000);
|
2022-03-20 19:58:12 +01:00
|
|
|
|
2022-07-21 12:33:22 +02:00
|
|
|
return 0;
|
|
|
|
}
|
2022-03-17 17:08:54 +01:00
|
|
|
|
2022-07-21 12:33:22 +02:00
|
|
|
CThreadManager::CThreadManager() {
|
|
|
|
m_esConfigTimer = wl_event_loop_add_timer(g_pCompositor->m_sWLEventLoop, handleTimer, this);
|
|
|
|
|
|
|
|
wl_event_source_timer_update(m_esConfigTimer, 1000);
|
|
|
|
}
|
2022-03-17 15:53:45 +01:00
|
|
|
|
2022-07-21 12:33:22 +02:00
|
|
|
CThreadManager::~CThreadManager() {
|
|
|
|
//
|
2022-03-17 15:53:45 +01:00
|
|
|
}
|