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) {
|
|
|
|
const auto PTM = (CThreadManager*)data;
|
2022-03-17 15:53:45 +01:00
|
|
|
|
2022-07-21 12:33:22 +02:00
|
|
|
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() {
|
2022-03-17 17:08:54 +01:00
|
|
|
g_pConfigManager->init();
|
|
|
|
|
2022-03-21 18:29:41 +01:00
|
|
|
HyprCtl::startHyprCtlSocket();
|
|
|
|
|
2022-07-31 00:27:32 +02:00
|
|
|
g_pCompositor->startHyprCtlTick();
|
|
|
|
|
2022-07-21 12:33:22 +02:00
|
|
|
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
|
|
|
}
|