Hyprland/src/managers/ThreadManager.cpp

32 lines
758 B
C++
Raw Normal View History

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