aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-02-27 22:34:02 +0000
committerVaxry <[email protected]>2024-02-27 22:34:07 +0000
commite2c286548d2a83376df3001bab0b48e529bd0075 (patch)
tree7148020cfb04fa40adc5830993db5257042aad46
parent60f81b8a23d3d18fc0e57ca56eadbce6facb27ee (diff)
downloadHyprland-e2c286548d2a83376df3001bab0b48e529bd0075.tar.gz
Hyprland-e2c286548d2a83376df3001bab0b48e529bd0075.zip
avar: return curve value of 1 when not animated
fixes #4862
-rw-r--r--src/helpers/AnimatedVariable.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp
index 50de0149..740e604f 100644
--- a/src/helpers/AnimatedVariable.cpp
+++ b/src/helpers/AnimatedVariable.cpp
@@ -75,6 +75,9 @@ float CAnimatedVariable::getPercent() {
}
float CAnimatedVariable::getCurveValue() {
+ if (!m_bIsBeingAnimated)
+ return 1.f;
+
const auto SPENT = getPercent();
if (SPENT >= 1.f)