GNOME Bugzilla – Bug 766685
Add animation for (un)maximize
Last modified: 2017-05-24 19:46:46 UTC
A good example can be seen in Elementary OS
I would like to see this too. We have full screen effects for both CSD and non CSD windows. It would be nice to see maximize and restore effects as well. In addition, this will fix the black artifacts when restoring CSD windows under Xorg. Thank you :)
Created attachment 352375 [details] [review] windowManager: Rename variable
Created attachment 352376 [details] [review] windowManager: Use sourceRect for consistency
Created attachment 352377 [details] [review] windowManager: Generalize translation values
Created attachment 352378 [details] [review] windowManager: Rename functions and variables
Created attachment 352379 [details] [review] windowManager: Remove SizeChange check for animating
I tried the side branch. It looks nice but somewhat slow on NVIDIA.
(In reply to Hussam Al-Tayeb from comment #7) > I tried the side branch. It looks nice but somewhat slow on NVIDIA. Slow with NVIDIA but smooth if you disable "Allow flipping" in nvidia settings. But disable fliiping doing tearing for me.
Created attachment 352524 [details] [review] windowManager: Rename variable Since there is already targetRect that represents where the window is going to move, rename oldRect to sourceRect to represent from where the window is moving.
Created attachment 352525 [details] [review] windowManager: Generalize translation values Currently, the translation values are set with the assumption that one of the actors represents a fullscreen window. In order to generalize it for any size change transition, we can simply swap the monitor rect with the source or target rect as appropriate, and translate the actor from the target to the source position by subtracting the former and adding the latter.
Created attachment 352526 [details] [review] windowManager: Use sourceRect for consistency Now that we always pass the old frame rect, we can use that instead of picking up the dimensions of the clone actor.
Created attachment 352527 [details] [review] windowManager: Rename functions and variables Stop using the word 'fullscreen' since the code is also going to be used for maximize and tile actions.
Created attachment 352528 [details] [review] windowManager: Add animations for maximize and unmaximize The fullscreen animation code is now generic enough to handle any size change animations, so stop limiting it to (un)fullscreen to get animations on (un)maximize as well.
LGTM
Attachment 352524 [details] pushed as 7090592 - windowManager: Rename variable Attachment 352525 [details] pushed as 0dca5e5 - windowManager: Generalize translation values Attachment 352526 [details] pushed as 4dfad53 - windowManager: Use sourceRect for consistency Attachment 352527 [details] pushed as a72f060 - windowManager: Rename functions and variables Attachment 352528 [details] pushed as 83fb346 - windowManager: Add animations for maximize and unmaximize
(In reply to Maxim from comment #8) > (In reply to Hussam Al-Tayeb from comment #7) > > I tried the side branch. It looks nice but somewhat slow on NVIDIA. > > Slow with NVIDIA but smooth if you disable "Allow flipping" in nvidia > settings. But disable fliiping doing tearing for me. It looks like my lag was due to a different issue. Gnome shell was slightly laggy after resuming from hibernate. With only 8GB ram, plenty was swapped. As a side effect of those patches, the flickering when un-maximizing CSD windows is a bit less visible due to the animations but Xorg process now uses a bit more memory. I would bet they look great on Wayland. Apart from that, thank you Florian Müllner and Alessandro Bono for the adding more Gnome Shell polish.