mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Accept FloatOrInt for input accel_speed, animation slowdown
Technically cfg-breaking due to introducing min/max limits at parse time, but values outside these limits were invalid anyway, so maybe it's fine?
This commit is contained in:
+2
-2
@@ -1319,7 +1319,7 @@ impl State {
|
||||
self.niri.layout.ensure_named_workspace(ws_config);
|
||||
}
|
||||
|
||||
let rate = 1.0 / config.animations.slowdown.max(0.001);
|
||||
let rate = 1.0 / config.animations.slowdown.0.max(0.001);
|
||||
self.niri.clock.set_rate(rate);
|
||||
self.niri
|
||||
.clock
|
||||
@@ -2227,7 +2227,7 @@ impl Niri {
|
||||
|
||||
let mut animation_clock = Clock::default();
|
||||
|
||||
let rate = 1.0 / config_.animations.slowdown.max(0.001);
|
||||
let rate = 1.0 / config_.animations.slowdown.0.max(0.001);
|
||||
animation_clock.set_rate(rate);
|
||||
animation_clock.set_complete_instantly(config_.animations.off);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user