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

animate: Add squeezimize animation #2408

Merged
merged 24 commits into from
Aug 27, 2024
Merged

animate: Add squeezimize animation #2408

merged 24 commits into from
Aug 27, 2024

Conversation

soreau
Copy link
Member

@soreau soreau commented Jul 25, 2024

No description provided.

@mark-herbert42
Copy link

tried it. Looks fine.

@soreau
Copy link
Member Author

soreau commented Jul 27, 2024

squeezimize

@soreau
Copy link
Member Author

soreau commented Aug 5, 2024

It is noteworthy, that minimize animations in general require participation from the panel client, to tell the compositor where the minimize target is, within the panel. This way, the compositor knows where to animate the minimizing surface. Specifically, the panel client must call zwlr_foreign_toplevel_handle_v1_set_rectangle() to set the geometry for the surface within the parent panel window.

Copy link
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't looked into the details of how the animation works, I trust your videos which show how cool it is ;) So I have focused my comments on suggestions about the general Wayfire animation/transformer API.

Most probably there will be similar comments in your other animation PRs, so I will not review them until we're finished with this first one.

plugins/animate/squeezimize.hpp Show resolved Hide resolved
plugins/animate/squeezimize.hpp Outdated Show resolved Hide resolved
plugins/animate/squeezimize.hpp Show resolved Hide resolved
plugins/animate/squeezimize.hpp Outdated Show resolved Hide resolved
plugins/animate/squeezimize.hpp Outdated Show resolved Hide resolved
plugins/animate/squeezimize.hpp Outdated Show resolved Hide resolved
plugins/animate/squeezimize.hpp Outdated Show resolved Hide resolved
plugins/animate/squeezimize.hpp Outdated Show resolved Hide resolved
plugins/animate/squeezimize.hpp Outdated Show resolved Hide resolved
plugins/animate/squeezimize.hpp Outdated Show resolved Hide resolved
@soreau soreau requested a review from ammen99 August 24, 2024 16:24
metadata/animate.xml Outdated Show resolved Hide resolved
Copy link
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, tested it and it works :)

One question which remains is what to do if the user minimizes without a minimize hint. The zoom animation will still animate the view, but as if it were closing. Wonder whether we can set a default minimize hint to be something like one of the corners of the screen?

@soreau
Copy link
Member Author

soreau commented Aug 26, 2024

LGTM now, tested it and it works :)

One question which remains is what to do if the user minimizes without a minimize hint. The zoom animation will still animate the view, but as if it were closing. Wonder whether we can set a default minimize hint to be something like one of the corners of the screen?

With waybar, apparently not setting the minimize hint results in the view just disappearing during the animation. I was thinking, if we get 0's for the hint or it's otherwise not set, we could try to target minimizing to mouse pointer. Compiz did it, but I'm not sure the wayfire code would work for this.

@ammen99
Copy link
Member

ammen99 commented Aug 26, 2024

LGTM now, tested it and it works :)
One question which remains is what to do if the user minimizes without a minimize hint. The zoom animation will still animate the view, but as if it were closing. Wonder whether we can set a default minimize hint to be something like one of the corners of the screen?

With waybar, apparently not setting the minimize hint results in the view just disappearing during the animation. I was thinking, if we get 0's for the hint or it's otherwise not set, we could try to target minimizing to mouse pointer. Compiz did it, but I'm not sure the wayfire code would work for this.

Following the pointer could be nice, but if it doesn't work well enough, we can just pick a random target .. That will be better than the view just disappearing, at least the user has a visual indication of what happened.

@marcusbritanicus
Copy link
Contributor

Why not do what the default minimize animation did? If the minimize hint is not set, then the view would minimize to the center of the screen.

@soreau
Copy link
Member Author

soreau commented Aug 26, 2024

Why not do what the default minimize animation did? If the minimize hint is not set, then the view would minimize to the center of the screen.

Sounds like it might work.

@soreau
Copy link
Member Author

soreau commented Aug 26, 2024

LGTM now, tested it and it works :)

One question which remains is what to do if the user minimizes without a minimize hint. The zoom animation will still animate the view, but as if it were closing. Wonder whether we can set a default minimize hint to be something like one of the corners of the screen?

I tinkered with this and it seems the 'best' option was to minimize to the bottom center of the output.

@soreau soreau requested a review from ammen99 August 26, 2024 14:23
Copy link
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, thanks!

@ammen99 ammen99 merged commit 4985fa1 into master Aug 27, 2024
8 checks passed
@ammen99 ammen99 deleted the squeezimize branch August 27, 2024 12:25
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