diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-04 15:56:31 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-11-04 15:56:31 +0000 |
| commit | 206360177fcae23436928542ed860c854b985db4 (patch) | |
| tree | c60b5cd406d79d14ef3dd88bcf615e7c1734e18b /src/helpers/AnimatedVariable.cpp | |
| parent | 34ad837fd93a55c2a234381c9077fba1c2fd154c (diff) | |
Multiple animation optimization and xwayland wine fixes
Diffstat (limited to 'src/helpers/AnimatedVariable.cpp')
| -rw-r--r-- | src/helpers/AnimatedVariable.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp index 573844aa..c4a1713d 100644 --- a/src/helpers/AnimatedVariable.cpp +++ b/src/helpers/AnimatedVariable.cpp @@ -12,8 +12,6 @@ void CAnimatedVariable::create(ANIMATEDVARTYPE type, SAnimationPropertyConfig* p m_pConfig = pAnimConfig; m_pWindow = pWindow; - g_pAnimationManager->m_lAnimatedVariables.push_back(this); - m_bDummy = false; } @@ -58,6 +56,10 @@ void CAnimatedVariable::unregister() { g_pAnimationManager->m_lAnimatedVariables.remove(this); } +void CAnimatedVariable::registerVar() { + g_pAnimationManager->m_lAnimatedVariables.push_back(this); +} + int CAnimatedVariable::getDurationLeftMs() { return std::max((int)(m_pConfig->pValues->internalSpeed * 100) - (int)std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - animationBegin).count(), 0); } |
