From 8860989b5a645cfc03007f9a6917634ccd677846 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler Date: Fri, 3 Jan 2025 12:35:52 +0100 Subject: [PATCH] Bring back --no-fade-in and move g_pAnimationManager initialization --- src/core/hyprlock.cpp | 2 +- src/core/hyprlock.hpp | 4 +--- src/main.cpp | 10 +++++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 350c0706..f0489868 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -23,7 +23,7 @@ using namespace Hyprutils::OS; -CHyprlock::CHyprlock(const std::string& wlDisplay, const bool immediate, const bool immediateRender, const bool noFadeIn) { +CHyprlock::CHyprlock(const std::string& wlDisplay, const bool immediate, const bool immediateRender) { m_sWaylandState.display = wl_display_connect(wlDisplay.empty() ? nullptr : wlDisplay.c_str()); if (!m_sWaylandState.display) { Debug::log(CRIT, "Couldn't connect to a wayland compositor"); diff --git a/src/core/hyprlock.hpp b/src/core/hyprlock.hpp index f5022c5a..a2a0ca32 100644 --- a/src/core/hyprlock.hpp +++ b/src/core/hyprlock.hpp @@ -29,7 +29,7 @@ struct SDMABUFModifier { class CHyprlock { public: - CHyprlock(const std::string& wlDisplay, const bool immediate, const bool immediateRender, const bool noFadeIn); + CHyprlock(const std::string& wlDisplay, const bool immediate, const bool immediateRender); ~CHyprlock(); void run(); @@ -95,8 +95,6 @@ class CHyprlock { bool m_bImmediateRender = false; - bool m_bNoFadeIn = false; - std::string m_sCurrentDesktop = ""; // diff --git a/src/main.cpp b/src/main.cpp index 65886d10..ff2bcbcb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -90,9 +90,10 @@ int main(int argc, char** argv, char** envp) { } } + g_pAnimationManager = std::make_unique(); + try { - g_pAnimationManager = std::make_unique(); - g_pConfigManager = std::make_unique(configPath); + g_pConfigManager = std::make_unique(configPath); g_pConfigManager->init(); } catch (const std::exception& ex) { Debug::log(CRIT, "ConfigManager threw: {}", ex.what()); @@ -102,8 +103,11 @@ int main(int argc, char** argv, char** envp) { return 1; } + if (noFadeIn) + g_pConfigManager->m_AnimationTree.setConfigForNode("fadeIn", false, 0.f, "default"); + try { - g_pHyprlock = std::make_unique(wlDisplay, immediate, immediateRender, noFadeIn); + g_pHyprlock = std::make_unique(wlDisplay, immediate, immediateRender); g_pHyprlock->run(); } catch (const std::exception& ex) { Debug::log(CRIT, "Hyprlock threw: {}", ex.what());