From d8dcadc5b279c11e8cb8d1b0b064cc2b62c04099 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 7 Feb 2024 20:03:23 +0400 Subject: Clamp animation slowdown to sane values --- src/main.rs | 2 +- src/niri.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 3dfacfa1..c7a7b475 100644 --- a/src/main.rs +++ b/src/main.rs @@ -180,7 +180,7 @@ fn main() -> Result<(), Box> { let slowdown = if config.animations.off { 0. } else { - config.animations.slowdown + config.animations.slowdown.clamp(0., 100.) }; animation::ANIMATION_SLOWDOWN.store(slowdown, Ordering::Relaxed); diff --git a/src/niri.rs b/src/niri.rs index aa1df4d9..78a85d29 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -585,7 +585,7 @@ impl State { let slowdown = if config.animations.off { 0. } else { - config.animations.slowdown + config.animations.slowdown.clamp(0., 100.) }; animation::ANIMATION_SLOWDOWN.store(slowdown, Ordering::Relaxed); -- cgit