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.
This commit is contained in:
thearturca
2024-08-24 22:15:34 +03:00
parent 935079281a
commit 18522db902

View File

@@ -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);
}