-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Conversation
4a8f15a
to
b6dde25
Compare
2b32c12
to
e618079
Compare
437aaed
to
cb35eeb
Compare
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 🚀 |
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. |
11675ef
to
6fe4661
Compare
71c6569
to
836cf66
Compare
@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 :) |
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. 😅 |
306513f
to
9af834f
Compare
9af834f
to
eeee1c8
Compare
2e454a3
to
8176849
Compare
9fd0067
to
b9aef9e
Compare
nice! |
5fcee6e
to
7732e7f
Compare
cb616e9
to
b58620f
Compare
18299c9
to
6fa3f8d
Compare
a7f158a
to
e27da73
Compare
e27da73
to
9551230
Compare
a25e7e3
to
2a67c9c
Compare
b84a244
to
de8b201
Compare
I think we are at the point where this can now be merged into I'll take some time this weekend to update the documentation and hopefully we should be able to get this merged for |
de8b201
to
923c040
Compare
Work on this feature was first started by @thearturca in November 2023 before komorebi v0.1.21 in #597 and has undergone numerous revisions to reach the point of this commit. Although this is a single squashed commit, almost all of the heavy lifting for this feature was done by @thearturca, which is where all of the kudos and gratitude should be directed. This commit adds a new static configuration block for animations, where they can be enabled, and have their style, fps and duration set. Corresponding SocketMessages and komorebic cli commands have also been exposed. There are some caveats to the use of this feature, which revolve around the quality of the Windows compositor (it is not very good): * There will be visual artifacts with various apps when animations are taking place - komorebi can't do anything about this as it is a limitation of the Windows compositor * Since komorebi's borders are implemented as independent windows are are not a part of the windows they are drawn around, these borders will be hidden while animations are in progress * If you wish to use borders with this feature, you'll probably better off using BorderImplementation::Windows, which uses the native thin "accent" borders, which are part of the windows they are drawn around, and can be moved with those windows during animations As a result of these and other caveats, this feature will be marked as "experimental" for the foreseeable future and will be off-by-default. Below, a number of now-squashed commits that contributed to the stabilization of this feature are referenced to help with code archeology in the future. 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. refactor(animation): renamed args parameters and variables names (8abb4b9) refactor(animation): inverse if-statement in `window::animate_position` (3de2c6e) There is was a bug when ease function generates `t` greater the `SetWindowPos` function will be called instead of `move_window`. `SetWindowPos` is only for last frame of animation. fix(wm): add shadow rect to `move_window` calls (b58620f) This fixes a bug when windows get shunk during the animation
923c040
to
06f7954
Compare
This has now been merged to master - I'll find some time this week to start working on the docs in prep for the next release |
This commit contains all the changes of #597 to make it easier to rebase with the latest changes on master post-v0.1.21.