Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(animation): bring in changes from #597 #685

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LGUG2Z
Copy link
Owner

@LGUG2Z LGUG2Z commented Feb 25, 2024

This commit contains all the changes of #597 to make it easier to rebase with the latest changes on master post-v0.1.21.

@LGUG2Z LGUG2Z force-pushed the feature/animated-move branch 2 times, most recently from 4a8f15a to b6dde25 Compare February 27, 2024 05:56
@raggi raggi force-pushed the feature/animated-move branch 2 times, most recently from 2b32c12 to e618079 Compare February 27, 2024 06:03
@LGUG2Z LGUG2Z force-pushed the feature/animated-move branch 3 times, most recently from 437aaed to cb35eeb Compare March 26, 2024 00:55
@krshrimali
Copy link
Contributor

Hi, @LGUG2Z - I understand you must be filled with work around other stuff, was just wondering on the progress with this? Please let me know if you need some help with it and I'll be happy to help wherever possible.

Animations in Komorebi would be great to have! 🎉 Thanks for the work, @raggi and @LGUG2Z 🚀

@raggi
Copy link
Sponsor Collaborator

raggi commented Apr 12, 2024

The main challenge we've seen in testing is that the animations cause chrome & cef windows to render in the wrong place - they start to render outside of their client rect (which isn't visible). This is sort of a chrome bug, but one that the animations robustly trigger.

I was experimenting with some other ways to do some of the actions that Komorebi takes recently, and they seem to work ok on Windows 11 so far, and might help with this problem - specifically avoiding attaching external input handler threads to the processes during window moves and focus events - but this relies on behavior we're not supposed to be allowed to do - lots of testing required.

@LGUG2Z LGUG2Z force-pushed the master branch 3 times, most recently from 11675ef to 6fe4661 Compare April 15, 2024 15:36
@LGUG2Z LGUG2Z force-pushed the feature/animated-move branch 5 times, most recently from 71c6569 to 836cf66 Compare April 26, 2024 01:32
@renhiyama
Copy link

@raggi would we have to wait for this chrome bug to be fixed before getting this pr merged? if yes, does it affect only google chrome or any other derivatives like edge and vscode, discord, etc ?

I cant wait for komorebi to have animations just like on hyprland, it's the last missing piece of software I needed to make my workflow on windows same as on linux :)

@LGUG2Z
Copy link
Owner Author

LGUG2Z commented Apr 28, 2024

This will probably be released as an "experimental" option (ie. you may have to do a hard restart of apps impacted by bugs and lose data if you can't save beforehand) in v0.1.26; hopefully someone will want to stabilize it enough that they'll drive themselves crazy finding a way to fix these bugs on our end vs. waiting for Electron apps to have this fixed via Chromium. 😅

@LGUG2Z LGUG2Z force-pushed the feature/animated-move branch 6 times, most recently from 306513f to 9af834f Compare May 1, 2024 16:58
This commit contains all the changes of #597 to make it easier to rebase
with the latest changes on master post-v0.1.21.

fix(animation): Fixed cancelling logic
(57e9b2f)

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

refactor(animation): avoid unwrap
(fa6d5bb)

fix(animation): Move cancel call to Animation struct
(306513f)

Only focused window was cancelling its animation because we call cancel
in window::set_position and waiting for its cancelling. And because we
waiting for cancelling second window is still moving. Second window will stop
moving only after the first window. So I moved `cancel` call to
Animation struct so its happening in its own thread and doesn't block
others animation moves and cancels.
@LGUG2Z LGUG2Z force-pushed the master branch 5 times, most recently from 0c842e4 to 05af7ce Compare May 19, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants