Skip to content

Commit

Permalink
init linear bezier in setDefaultAnimationVars, remove import in Confi…
Browse files Browse the repository at this point in the history
…gManager

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 044e40a634..62b0cb2ebc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,7 +104,7 @@
 pkg_check_modules(aquamarine_dep REQUIRED IMPORTED_TARGET aquamarine>=0.4.5)
 pkg_check_modules(hyprlang_dep REQUIRED IMPORTED_TARGET hyprlang>=0.3.2)
 pkg_check_modules(hyprcursor_dep REQUIRED IMPORTED_TARGET hyprcursor>=0.1.7)
-pkg_check_modules(hyprutils_dep REQUIRED IMPORTED_TARGET hyprutils>=0.3.2)
+pkg_check_modules(hyprutils_dep REQUIRED IMPORTED_TARGET hyprutils>=0.3.1)
 pkg_check_modules(hyprgraphics_dep REQUIRED IMPORTED_TARGET hyprgraphics>=0.1.1)
 
 add_compile_definitions(AQUAMARINE_VERSION="${aquamarine_dep_VERSION}")
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index ddb0ca0abb..2ff348ca2a 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -777,6 +777,8 @@
 }
 
 void CConfigManager::setDefaultAnimationVars() {
+    g_pAnimationManager->addBezierWithName("linear", Vector2D(0.0, 0.0), Vector2D(1.0, 1.0));
+
     m_AnimationTree.createNode("__internal_fadeCTM");
     m_AnimationTree.createNode("global");
 
@@ -824,7 +826,6 @@
     m_vWindowRules.clear();
     g_pKeybindManager->clearKeybinds();
     g_pAnimationManager->removeAllBeziers();
-    g_pAnimationManager->addBezierWithName("linear", Vector2D(0.0, 0.0), Vector2D(1.0, 1.0));
     m_mAdditionalReservedAreas.clear();
     m_dBlurLSNamespaces.clear();
     m_vWorkspaceRules.clear();
diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp
index 9830347f24..a0819a05f3 100644
--- a/src/config/ConfigManager.hpp
+++ b/src/config/ConfigManager.hpp
@@ -3,7 +3,6 @@
 #include <hyprutils/animation/AnimationConfig.hpp>
 #define CONFIG_MANAGER_H
 
-#include <hyprutils/animation/AnimatedVariable.hpp>
 #include <map>
 #include "../debug/Log.hpp"
 #include <unordered_map>
@@ -287,7 +286,6 @@
     std::string                                      m_szConfigErrors = "";
 
     // internal methods
-    void                              setAnimForChildren(SP<Hyprutils::Animation::SAnimationPropertyConfig> const);
     void                              updateBlurredLS(const std::string&, const bool);
     void                              setDefaultAnimationVars();
     std::optional<std::string>        resetHLConfig();
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp
index 6bfeed8335..690a31a9e3 100644
--- a/src/managers/AnimationManager.cpp
+++ b/src/managers/AnimationManager.cpp
@@ -34,8 +34,6 @@
 CHyprAnimationManager::CHyprAnimationManager() {
     m_pAnimationTimer = SP<CEventLoopTimer>(new CEventLoopTimer(std::chrono::microseconds(500), wlTick, nullptr));
     g_pEventLoopManager->addTimer(m_pAnimationTimer);
-
-    addBezierWithName("linear", Vector2D(0.0, 0.0), Vector2D(1.0, 1.0));
 }
 
 template <Animable VarType>
  • Loading branch information
PaideiaDilemma committed Jan 2, 2025
1 parent 6ff0dce commit 33fbc53
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ find_package(OpenGL REQUIRED COMPONENTS ${GLES_VERSION})
pkg_check_modules(aquamarine_dep REQUIRED IMPORTED_TARGET aquamarine>=0.4.5)
pkg_check_modules(hyprlang_dep REQUIRED IMPORTED_TARGET hyprlang>=0.3.2)
pkg_check_modules(hyprcursor_dep REQUIRED IMPORTED_TARGET hyprcursor>=0.1.7)
pkg_check_modules(hyprutils_dep REQUIRED IMPORTED_TARGET hyprutils>=0.3.2)
pkg_check_modules(hyprutils_dep REQUIRED IMPORTED_TARGET hyprutils>=0.3.1)
pkg_check_modules(hyprgraphics_dep REQUIRED IMPORTED_TARGET hyprgraphics>=0.1.1)

add_compile_definitions(AQUAMARINE_VERSION="${aquamarine_dep_VERSION}")
Expand Down
3 changes: 2 additions & 1 deletion src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,8 @@ void CConfigManager::reload() {
}

void CConfigManager::setDefaultAnimationVars() {
g_pAnimationManager->addBezierWithName("linear", Vector2D(0.0, 0.0), Vector2D(1.0, 1.0));

m_AnimationTree.createNode("__internal_fadeCTM");
m_AnimationTree.createNode("global");

Expand Down Expand Up @@ -824,7 +826,6 @@ std::optional<std::string> CConfigManager::resetHLConfig() {
m_vWindowRules.clear();
g_pKeybindManager->clearKeybinds();
g_pAnimationManager->removeAllBeziers();
g_pAnimationManager->addBezierWithName("linear", Vector2D(0.0, 0.0), Vector2D(1.0, 1.0));
m_mAdditionalReservedAreas.clear();
m_dBlurLSNamespaces.clear();
m_vWorkspaceRules.clear();
Expand Down
2 changes: 0 additions & 2 deletions src/config/ConfigManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <hyprutils/animation/AnimationConfig.hpp>
#define CONFIG_MANAGER_H

#include <hyprutils/animation/AnimatedVariable.hpp>
#include <map>
#include "../debug/Log.hpp"
#include <unordered_map>
Expand Down Expand Up @@ -287,7 +286,6 @@ class CConfigManager {
std::string m_szConfigErrors = "";

// internal methods
void setAnimForChildren(SP<Hyprutils::Animation::SAnimationPropertyConfig> const);
void updateBlurredLS(const std::string&, const bool);
void setDefaultAnimationVars();
std::optional<std::string> resetHLConfig();
Expand Down
2 changes: 0 additions & 2 deletions src/managers/AnimationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ static int wlTick(SP<CEventLoopTimer> self, void* data) {
CHyprAnimationManager::CHyprAnimationManager() {
m_pAnimationTimer = SP<CEventLoopTimer>(new CEventLoopTimer(std::chrono::microseconds(500), wlTick, nullptr));
g_pEventLoopManager->addTimer(m_pAnimationTimer);

addBezierWithName("linear", Vector2D(0.0, 0.0), Vector2D(1.0, 1.0));
}

template <Animable VarType>
Expand Down

0 comments on commit 33fbc53

Please sign in to comment.