ui: pass logger to toolkit

This commit is contained in:
Vaxry 2025-12-04 18:20:51 +00:00
parent 0c0a814d26
commit 33df1eecef
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -82,7 +82,11 @@ void CUI::registerOutput(const SP<Hyprtoolkit::IOutput>& mon) {
bool CUI::run() { bool CUI::run() {
static const auto PENABLEIPC = Hyprlang::CSimpleConfigValue<Hyprlang::INT>(g_config->hyprlang(), "ipc"); static const auto PENABLEIPC = Hyprlang::CSimpleConfigValue<Hyprlang::INT>(g_config->hyprlang(), "ipc");
m_backend = Hyprtoolkit::IBackend::create(); auto data = Hyprtoolkit::IBackend::SBackendCreationData();
data.pLogConnection = makeShared<Hyprutils::CLI::CLoggerConnection>(*g_logger.get());
data.pLogConnection->setName("hyprtoolkit");
data.pLogConnection->setLogLevel(LOG_DEBUG);
m_backend = Hyprtoolkit::IBackend::createWithData(data);
if (!m_backend) if (!m_backend)
return false; return false;