aboutsummaryrefslogtreecommitdiff
path: root/src/layout/closing_window.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-11-24 09:41:43 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-11-25 04:07:59 -0800
commit4c22c3285d8b10fbcef1c45a0788c3ddca03ec62 (patch)
tree506174fe9962a91598ac25d4d2dee1cdaa3d5292 /src/layout/closing_window.rs
parent93cee2994ab9ccf59a09f61d5b8acf6cd937d654 (diff)
downloadniri-4c22c3285d8b10fbcef1c45a0788c3ddca03ec62.tar.gz
niri-4c22c3285d8b10fbcef1c45a0788c3ddca03ec62.tar.bz2
niri-4c22c3285d8b10fbcef1c45a0788c3ddca03ec62.zip
Refactor animation timing to use lazy clocks
Diffstat (limited to 'src/layout/closing_window.rs')
-rw-r--r--src/layout/closing_window.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/layout/closing_window.rs b/src/layout/closing_window.rs
index 744c099e..12a77f92 100644
--- a/src/layout/closing_window.rs
+++ b/src/layout/closing_window.rs
@@ -1,5 +1,4 @@
use std::collections::HashMap;
-use std::time::Duration;
use anyhow::Context as _;
use glam::{Mat3, Vec2};
@@ -138,15 +137,15 @@ impl ClosingWindow {
})
}
- pub fn advance_animations(&mut self, current_time: Duration) {
+ pub fn advance_animations(&mut self) {
match &mut self.anim_state {
AnimationState::Waiting { blocker, anim } => {
if blocker.state() != BlockerState::Pending {
- let anim = anim.restarted(current_time, 0., 1., 0.);
+ let anim = anim.restarted(0., 1., 0.);
self.anim_state = AnimationState::Animating(anim);
}
}
- AnimationState::Animating(anim) => anim.set_current_time(current_time),
+ AnimationState::Animating(_anim) => (),
}
}