Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/core/AnimationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ void updateGradientVariable(CAnimatedVariable<CGradientValueData>& av, const flo

void CHyprlockAnimationManager::tick() {
static const auto ANIMATIONSENABLED = g_pConfigManager->getValue<Hyprlang::INT>("animations:enabled");
for (size_t i = 0; i < m_vActiveAnimatedVariables.size(); i++) {
const auto PAV = m_vActiveAnimatedVariables[i].lock();
for (const auto& PAV : m_vActiveAnimatedVariables) {
if (!PAV || !PAV->ok())
continue;

Expand Down
8 changes: 3 additions & 5 deletions src/core/AnimationManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ class CHyprlockAnimationManager : public Hyprutils::Animation::CAnimationManager
template <Animable VarType>
void createAnimation(const VarType& v, PHLANIMVAR<VarType>& pav, SP<SAnimationPropertyConfig> pConfig) {
constexpr const eAnimatedVarType EAVTYPE = typeToeAnimatedVarType<VarType>;
const auto PAV = makeShared<CAnimatedVariable<VarType>>();
pav = makeUnique<CAnimatedVariable<VarType>>();

PAV->create(EAVTYPE, static_cast<Hyprutils::Animation::CAnimationManager*>(this), PAV, v);
PAV->setConfig(pConfig);

pav = std::move(PAV);
pav->create(EAVTYPE, static_cast<Hyprutils::Animation::CAnimationManager*>(this), pav, v);
pav->setConfig(pConfig);
}

bool m_bTickScheduled = false;
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/AnimatedVariable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ template <Animable VarType>
using CAnimatedVariable = Hyprutils::Animation::CGenericAnimatedVariable<VarType, SAnimationContext>;

template <Animable VarType>
using PHLANIMVAR = SP<CAnimatedVariable<VarType>>;
using PHLANIMVAR = UP<CAnimatedVariable<VarType>>;

template <Animable VarType>
using PHLANIMVARREF = WP<CAnimatedVariable<VarType>>;
Loading