mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-08 04:25:59 +01:00
Cleanup compositor deadcode (#2657)
* Remove dead code as it is a part of CCompositor::cleanup * Unify sd_notify logic with Compositor lifetime
This commit is contained in:
parent
bbedb065e1
commit
41358c6fb5
2 changed files with 5 additions and 16 deletions
|
@ -310,6 +310,11 @@ void CCompositor::cleanup() {
|
||||||
|
|
||||||
m_bIsShuttingDown = true;
|
m_bIsShuttingDown = true;
|
||||||
|
|
||||||
|
#ifdef USES_SYSTEMD
|
||||||
|
if (sd_booted() > 0)
|
||||||
|
sd_notify(0, "STOPPING=1");
|
||||||
|
#endif
|
||||||
|
|
||||||
// unload all remaining plugins while the compositor is
|
// unload all remaining plugins while the compositor is
|
||||||
// still in a normal working state.
|
// still in a normal working state.
|
||||||
g_pPluginSystem->unloadAllPlugins();
|
g_pPluginSystem->unloadAllPlugins();
|
||||||
|
|
16
src/main.cpp
16
src/main.cpp
|
@ -11,10 +11,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
#ifdef USES_SYSTEMD
|
|
||||||
#include <systemd/sd-daemon.h> // for sd_notify
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void help() {
|
void help() {
|
||||||
std::cout << "usage: Hyprland [arg [...]].\n";
|
std::cout << "usage: Hyprland [arg [...]].\n";
|
||||||
std::cout << "\nArguments:\n";
|
std::cout << "\nArguments:\n";
|
||||||
|
@ -102,17 +98,5 @@ int main(int argc, char** argv) {
|
||||||
// If we are here it means we got yote.
|
// If we are here it means we got yote.
|
||||||
Debug::log(LOG, "Hyprland reached the end.");
|
Debug::log(LOG, "Hyprland reached the end.");
|
||||||
|
|
||||||
#ifdef USES_SYSTEMD
|
|
||||||
// tell systemd it destroy bound/related units
|
|
||||||
if (sd_booted() > 0)
|
|
||||||
sd_notify(0, "STOPPING=1");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (g_pCompositor->m_sWLDisplay)
|
|
||||||
wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);
|
|
||||||
|
|
||||||
if (g_pCompositor->m_sWLDisplay)
|
|
||||||
wl_display_destroy(g_pCompositor->m_sWLDisplay);
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue