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

Fix: cross monitor animation #920

Closed

Conversation

thearturca
Copy link
Contributor

No description provided.

This commit fixes cross-monitor drag move by extending cancelling
system. Now each cancel call have its own idx. And only latest cancel
will continue animation. Others will be dropped.
Global variable removed due to previous fix commit
@thearturca thearturca marked this pull request as draft July 23, 2024 16:24
@thearturca thearturca marked this pull request as ready for review July 23, 2024 17:37
@amnweb
Copy link

amnweb commented Jul 24, 2024

There is some strange error when you move the window with the mouse.

recordedVideo.mp4

@thearturca
Copy link
Contributor Author

There is some strange error when you move the window with the mouse.

recordedVideo.mp4

Fixed in last commit

@thearturca thearturca marked this pull request as ready for review August 1, 2024 15:11
LGUG2Z pushed a commit that referenced this pull request Aug 24, 2024
This commit is a squashed combination of the following commits from #920
by @thearturca. Thanks to both @thearturca for @amnweb for their work in
fixing and thoroughly testing these changes respectively.

9350792
fix(animation): added pending cancel count to track `is_cancelled` state

84ad947
refactor(animation): remove cancel idx decreasing

804b038
refactor(animation): remove `ANIMATION_TEMPORARILY_DISABLED` global vars

f257873
fix(animation): extend cancelling system to support multiple cancel call

dfd6e98
refactor(window): reuse window rect in `animate_position` method
@LGUG2Z
Copy link
Owner

LGUG2Z commented Aug 24, 2024

Merged with an interactive rebase here: 9260b68

Thank you @thearturca!

@LGUG2Z LGUG2Z closed this Aug 24, 2024
@javierportillo
Copy link
Contributor

I've just tested the cross-monitor animations from the latest in master branch (9260b68) and it seems to hide the window borders (Komorebi implementation) and also the stackbars. This happens only when moving windows across monitors, and not when just moving windows on one monitor.

output.mp4

@LGUG2Z LGUG2Z reopened this Aug 24, 2024
…cel_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.
@thearturca
Copy link
Contributor Author

I've just tested the cross-monitor animations from the latest in master branch (9260b68) and it seems to hide the window borders (Komorebi implementation) and also the stackbars. This happens only when moving windows across monitors, and not when just moving windows on one monitor.

Found a bug. Now this is fixed for this PR

LGUG2Z pushed a commit that referenced this pull request Aug 25, 2024
This commit is a squashed combination of the following commits from #920
by @thearturca. Thanks to both @thearturca for @amnweb for their work in
fixing and thoroughly testing these changes respectively.

9350792
fix(animation): added pending cancel count to track `is_cancelled` state

84ad947
refactor(animation): remove cancel idx decreasing

804b038
refactor(animation): remove `ANIMATION_TEMPORARILY_DISABLED` global vars

f257873
fix(animation): extend cancelling system to support multiple cancel call

dfd6e98
refactor(window): reuse window rect in `animate_position` method

18522db
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.
@LGUG2Z
Copy link
Owner

LGUG2Z commented Aug 25, 2024

Thanks! Squashed this into 3c03528

@LGUG2Z LGUG2Z closed this Aug 25, 2024
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.

4 participants