After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766685 - Add animation for (un)maximize
Add animation for (un)maximize
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: window-management
3.25.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 782968
Blocks:
 
 
Reported: 2016-05-19 21:02 UTC by garuwex
Modified: 2017-05-24 19:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
windowManager: Rename variable (1.20 KB, patch)
2017-05-22 20:37 UTC, Alessandro Bono
none Details | Review
windowManager: Use sourceRect for consistency (1.38 KB, patch)
2017-05-22 20:37 UTC, Alessandro Bono
none Details | Review
windowManager: Generalize translation values (1.84 KB, patch)
2017-05-22 20:37 UTC, Alessandro Bono
none Details | Review
windowManager: Rename functions and variables (3.61 KB, patch)
2017-05-22 20:37 UTC, Alessandro Bono
none Details | Review
windowManager: Remove SizeChange check for animating (1007 bytes, patch)
2017-05-22 20:37 UTC, Alessandro Bono
none Details | Review
windowManager: Rename variable (1.35 KB, patch)
2017-05-24 19:12 UTC, Alessandro Bono
committed Details | Review
windowManager: Generalize translation values (2.25 KB, patch)
2017-05-24 19:12 UTC, Alessandro Bono
committed Details | Review
windowManager: Use sourceRect for consistency (1.45 KB, patch)
2017-05-24 19:12 UTC, Alessandro Bono
committed Details | Review
windowManager: Rename functions and variables (3.71 KB, patch)
2017-05-24 19:13 UTC, Alessandro Bono
committed Details | Review
windowManager: Add animations for maximize and unmaximize (1.16 KB, patch)
2017-05-24 19:13 UTC, Alessandro Bono
committed Details | Review

Description garuwex 2016-05-19 21:02:39 UTC
A good example can be seen in Elementary OS
Comment 1 Hussam Al-Tayeb 2017-03-23 17:33:59 UTC
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 :)
Comment 2 Alessandro Bono 2017-05-22 20:37:28 UTC
Created attachment 352375 [details] [review]
windowManager: Rename variable
Comment 3 Alessandro Bono 2017-05-22 20:37:34 UTC
Created attachment 352376 [details] [review]
windowManager: Use sourceRect for consistency
Comment 4 Alessandro Bono 2017-05-22 20:37:40 UTC
Created attachment 352377 [details] [review]
windowManager: Generalize translation values
Comment 5 Alessandro Bono 2017-05-22 20:37:47 UTC
Created attachment 352378 [details] [review]
windowManager: Rename functions and variables
Comment 6 Alessandro Bono 2017-05-22 20:37:59 UTC
Created attachment 352379 [details] [review]
windowManager: Remove SizeChange check for animating
Comment 7 Hussam Al-Tayeb 2017-05-23 19:37:14 UTC
I tried the side branch. It looks nice but somewhat slow on NVIDIA.
Comment 8 Maxim 2017-05-24 14:17:40 UTC
(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.
Comment 9 Alessandro Bono 2017-05-24 19:12:38 UTC
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.
Comment 10 Alessandro Bono 2017-05-24 19:12:45 UTC
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.
Comment 11 Alessandro Bono 2017-05-24 19:12:58 UTC
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.
Comment 12 Alessandro Bono 2017-05-24 19:13:11 UTC
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.
Comment 13 Alessandro Bono 2017-05-24 19:13:17 UTC
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.
Comment 14 Florian Müllner 2017-05-24 19:16:12 UTC
LGTM
Comment 15 Alessandro Bono 2017-05-24 19:29:43 UTC
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
Comment 16 Hussam Al-Tayeb 2017-05-24 19:46:46 UTC
(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.