diff options
| author | Yaroslav <ilelkin@icloud.com> | 2024-04-20 22:50:07 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-20 18:50:07 +0100 |
| commit | a94534606412ec30620f68751382cea5b700ba8d (patch) | |
| tree | 9519e69c1661d38b3fc1b925dbecd5a27e30d168 /src/Compositor.cpp | |
| parent | ea47e8c92ae283c4b41be0aafbdad9b0701a1624 (diff) | |
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 <mihai@fufexan.net>
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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 <systemd/sd-daemon.h> // for sd_notify +#include <helpers/SdDaemon.hpp> // for SdNotify #endif #include <ranges> #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 |
