mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-05-08 11:53:29 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user