-
Notifications
You must be signed in to change notification settings - Fork 198
animate: Add squeezimize animation #2408
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
Conversation
tried it. Looks fine. |
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. |
There was a problem hiding this 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.
This fixes disappearing windows on animation start after reversing the animation once.
This optimization is no longer needed since we are using a fast fragment shader now.
This makes it so it doesn't get the wrong clipping area when other transformations are applied.
This will help avoid conflicts of the same variable name in scope.
This is taken care of in transform_damage_region().
There was a problem hiding this 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?
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. |
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. |
I tinkered with this and it seems the 'best' option was to minimize to the bottom center of the output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, thanks!
* animate: Add squeeimize animation * Fix clipping * Fix minimize to bottom * Improve squeezimize animation * Fix minimize to bottom (again) * Initialize last_direction variable This fixes disappearing windows on animation start after reversing the animation once. * Fixup object lifetime * Add options for squeezimize * Compute bounding box for animation damage * Port to shader * Fix downward squeezimize * Drop squeezimize line height option This optimization is no longer needed since we are using a fast fragment shader now. * Fix builtins * Omit unnecessary conditional in shader * Simplify animation initialization function * Fix squeezimize for shaded views * squeezimize: Update animation geometry each frame This makes it so it doesn't get the wrong clipping area when other transformations are applied. * Use more unique name for transformer name variable This will help avoid conflicts of the same variable name in scope. * squeezimize: Update according to suggestions in review * squeezimize: Drop damage pre_hook This is taken care of in transform_damage_region(). * squeezimize: Avoid storing view on transformer * squeezimize: Fix typo * animate: Set default squeezimize duration to 150ms * animate: Minimize to bottom center of output if target is not set
* animate: Add squeeimize animation * Fix clipping * Fix minimize to bottom * Improve squeezimize animation * Fix minimize to bottom (again) * Initialize last_direction variable This fixes disappearing windows on animation start after reversing the animation once. * Fixup object lifetime * Add options for squeezimize * Compute bounding box for animation damage * Port to shader * Fix downward squeezimize * Drop squeezimize line height option This optimization is no longer needed since we are using a fast fragment shader now. * Fix builtins * Omit unnecessary conditional in shader * Simplify animation initialization function * Fix squeezimize for shaded views * squeezimize: Update animation geometry each frame This makes it so it doesn't get the wrong clipping area when other transformations are applied. * Use more unique name for transformer name variable This will help avoid conflicts of the same variable name in scope. * squeezimize: Update according to suggestions in review * squeezimize: Drop damage pre_hook This is taken care of in transform_damage_region(). * squeezimize: Avoid storing view on transformer * squeezimize: Fix typo * animate: Set default squeezimize duration to 150ms * animate: Minimize to bottom center of output if target is not set
No description provided.