From 18522db9023f33b3ed67f004f60d44e342f4bed9 Mon Sep 17 00:00:00 2001 From: thearturca Date: Sat, 24 Aug 2024 22:15:34 +0300 Subject: [PATCH] fix(animations): change check for existings animation to `pending_cancel_count` field Before it was checking `cancel_idx_counter` which is `id` counter. It never gonna equals `0` and doesn't represent all animations that running for that window. So it doesn't delete entry from hashmap. That leads to bug when border and stackbar doesn't get notified after animation ends. --- komorebi/src/animation_manager.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/komorebi/src/animation_manager.rs b/komorebi/src/animation_manager.rs index da6053a1..ce0308cd 100644 --- a/komorebi/src/animation_manager.rs +++ b/komorebi/src/animation_manager.rs @@ -99,7 +99,7 @@ impl AnimationManager { if let Some(animation_state) = self.animations.get_mut(&hwnd) { animation_state.in_progress = false; - if animation_state.cancel_idx_counter == 0 { + if animation_state.pending_cancel_count == 0 { self.animations.remove(&hwnd); ANIMATIONS_IN_PROGRESS.store(self.animations.len(), Ordering::Release); }