From a94534606412ec30620f68751382cea5b700ba8d Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Sat, 20 Apr 2024 22:50:07 +0500 Subject: core: remove libsystemd dependency (#5660) * remove libsystemd dependency as per Lennart Poettering's advice: https://github.com/systemd/systemd/issues/32028#issuecomment-2031366922 * fix naming for systemd helper functions * rename vars according to code style * Nix: update meson patch --------- Co-authored-by: Mihai Fufezan --- src/Compositor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index bc229d32..edf7c25d 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -8,7 +8,7 @@ #include "debug/HyprCtl.hpp" #include "debug/CrashReporter.hpp" #ifdef USES_SYSTEMD -#include // for sd_notify +#include // for SdNotify #endif #include #include "helpers/VarList.hpp" @@ -385,8 +385,8 @@ void CCompositor::cleanup() { Debug::shuttingDown = true; #ifdef USES_SYSTEMD - if (sd_booted() > 0 && !envEnabled("HYPRLAND_NO_SD_NOTIFY")) - sd_notify(0, "STOPPING=1"); + if (Systemd::SdBooted() > 0 && !envEnabled("HYPRLAND_NO_SD_NOTIFY")) + Systemd::SdNotify(0, "STOPPING=1"); #endif // unload all remaining plugins while the compositor is @@ -615,10 +615,10 @@ void CCompositor::startCompositor() { g_pHyprRenderer->setCursorFromName("left_ptr"); #ifdef USES_SYSTEMD - if (sd_booted() > 0) { + if (Systemd::SdBooted() > 0) { // tell systemd that we are ready so it can start other bond, following, related units if (!envEnabled("HYPRLAND_NO_SD_NOTIFY")) - sd_notify(0, "READY=1"); + Systemd::SdNotify(0, "READY=1"); } else Debug::log(LOG, "systemd integration is baked in but system itself is not booted à la systemd!"); #endif -- cgit v1.2.3