Added static animation state manager for tracking "in_progress" and "is_cancelled" states. The idea is not to have states in Animation struct but to keep them in HashMap<hwnd, AnimationState> behind reference (Arc<Mutex<>>). So we each animation frame we have access to state and can cancel animation if we have to.
Need review and testings
@raggi @LGUG2Z
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/LGUG2Z/komorebi/pull/798
**Author:** [@thearturca](https://github.com/thearturca)
**Created:** 4/30/2024
**Status:** ✅ Merged
**Merged:** 4/30/2024
**Merged by:** [@LGUG2Z](https://github.com/LGUG2Z)
**Base:** `feature/animated-move` ← **Head:** `feature/animated-move`
---
### 📝 Commits (2)
- [`4e0cde7`](https://github.com/LGUG2Z/komorebi/commit/4e0cde7b458008c77d01e0aebaaf138be11f929b) fix(animation): Fixed cancelling logic
- [`1495dd8`](https://github.com/LGUG2Z/komorebi/commit/1495dd84dc69b68501af300b72dee1b30b69ef97) refactor(animation): avoid unwrap
### 📊 Changes
**4 files changed** (+97 additions, -40 deletions)
<details>
<summary>View changed files</summary>
📝 `komorebi/src/animation.rs` (+21 -36)
➕ `komorebi/src/animation_manager.rs` (+68 -0)
📝 `komorebi/src/lib.rs` (+5 -0)
📝 `komorebi/src/window.rs` (+3 -4)
</details>
### 📄 Description
Added static animation state manager for tracking "in_progress" and "is_cancelled" states. The idea is not to have states in Animation struct but to keep them in HashMap<hwnd, AnimationState> behind reference (Arc<Mutex<>>). So we each animation frame we have access to state and can cancel animation if we have to.
Need review and testings
@raggi @LGUG2Z
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/798
Author: @thearturca
Created: 4/30/2024
Status: ✅ Merged
Merged: 4/30/2024
Merged by: @LGUG2Z
Base:
feature/animated-move← Head:feature/animated-move📝 Commits (2)
4e0cde7fix(animation): Fixed cancelling logic1495dd8refactor(animation): avoid unwrap📊 Changes
4 files changed (+97 additions, -40 deletions)
View changed files
📝
komorebi/src/animation.rs(+21 -36)➕
komorebi/src/animation_manager.rs(+68 -0)📝
komorebi/src/lib.rs(+5 -0)📝
komorebi/src/window.rs(+3 -4)📄 Description
Added static animation state manager for tracking "in_progress" and "is_cancelled" states. The idea is not to have states in Animation struct but to keep them in HashMap<hwnd, AnimationState> behind reference (Arc<Mutex<>>). So we each animation frame we have access to state and can cancel animation if we have to.
Need review and testings
@raggi @LGUG2Z
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.