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 732857 - Improve window manager animations
Improve window manager animations
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-07 15:24 UTC by Giovanni Campagna
Modified: 2014-07-29 13:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
WindowManager: improve minimize/map/unmap animations (8.80 KB, patch)
2014-07-07 15:25 UTC, Giovanni Campagna
none Details | Review
WindowManager: improve maximize/unmaximize animations (5.06 KB, patch)
2014-07-07 15:25 UTC, Giovanni Campagna
none Details | Review
WindowManager: improve minimize/map animations (9.21 KB, patch)
2014-07-08 10:09 UTC, Giovanni Campagna
none Details | Review
WindowManager: improve maximize/unmaximize animations (5.31 KB, patch)
2014-07-08 10:09 UTC, Giovanni Campagna
none Details | Review
WindowManager: improve destroy window animation (4.56 KB, patch)
2014-07-08 10:09 UTC, Giovanni Campagna
none Details | Review
tweak the patch set (1.79 KB, patch)
2014-07-08 11:43 UTC, Allan Day
none Details | Review
WindowManager: improve minimize/map animations (9.22 KB, patch)
2014-07-29 07:18 UTC, Giovanni Campagna
committed Details | Review
WindowManager: improve destroy window animation (4.56 KB, patch)
2014-07-29 07:24 UTC, Giovanni Campagna
committed Details | Review
WindowManager: update animation timings after designer review (4.60 KB, patch)
2014-07-29 07:24 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2014-07-07 15:24:58 UTC
Got the idea from a couple threads on gnome-shell-list, and decided
to rip off the competition without shame :)

Note: only the first patch is for review, the second one is attached
if you want to help me debug it.
Btw, I believe the proper fix would be for mutter to animate using
the target texture, which has the new borders/widget layout and blends
smoothly with the final result. Of course, to do that mutter needs
to have a target texture in the first place, which is something
mutter has control on only with gtk3.
Alternatively, we could punt all animated resizing on the client
side...
Comment 1 Giovanni Campagna 2014-07-07 15:25:03 UTC
Created attachment 280072 [details] [review]
WindowManager: improve minimize/map/unmap animations

Using the parameters from Elementary's Gala, which is generally
considered a DE that cares about eye-candy.
Comment 2 Giovanni Campagna 2014-07-07 15:25:12 UTC
Created attachment 280073 [details] [review]
WindowManager: improve maximize/unmaximize animations

Again using parameters from Elementary OS.

Unfortunately the effect is not as pleasant: the texture is
stretched and the window contents update suddenly at the
end, while the anchor point is often in the wrong place.
Comment 3 Allan Day 2014-07-08 08:44:03 UTC
I tried the patches. It's certainly interesting. I do feel that our window animations could do with some work. Right now, the animation when opening/closing a window isn't really noticeable. Also, the animations for dialogs opening/closing seem too long. This makes the transition feel clunky.

Regarding the changes in the first patch:

 * Minimize feels like an improvement.
 * Open window does feel smoother than what we have, but it also feels a bit too severe and in your face
 * Open menu seems really too much. It's distracting.
Comment 4 Giovanni Campagna 2014-07-08 09:02:17 UTC
(Consider that right now, there is no animation at all for open/close window, except for attached modal dialiogs)

For the new open window animation, to me it looks like what most other OSes provide, but I'm open to suggestions.

For open menu, I agree the animation is a bit long, and probably should be different (slide+fade like we do for shell menus?)
Comment 5 Florian Müllner 2014-07-08 09:14:37 UTC
Review of attachment 280072 [details] [review]:

::: js/ui/windowManager.js
@@ +726,3 @@
 
+    _shouldAnimateActor: function(actor, types) {
+        if (!this._shouldAnimate)

Drive-by comment: You stopped calling _shouldAnimate here
Comment 6 Allan Day 2014-07-08 09:15:20 UTC
(In reply to comment #4)
> (Consider that right now, there is no animation at all for open/close window,
> except for attached modal dialiogs)
> 
> For the new open window animation, to me it looks like what most other OSes
> provide, but I'm open to suggestions.

I'd be interested to try what's in the patch, but with a slightly shorter duration.

> For open menu, I agree the animation is a bit long, and probably should be
> different (slide+fade like we do for shell menus?)

Yep, agree.

Also, it would be good to preserve the existing dialog window animation, but with a faster transition.
Comment 7 Giovanni Campagna 2014-07-08 10:09:37 UTC
Created attachment 280129 [details] [review]
WindowManager: improve minimize/map animations

Using the parameters from Elementary's Gala, which is generally
considered a DE that cares about eye-candy.
Comment 8 Giovanni Campagna 2014-07-08 10:09:45 UTC
Created attachment 280130 [details] [review]
WindowManager: improve maximize/unmaximize animations

Again using parameters from Elementary OS.

Unfortunately the effect is not as pleasant: the texture is
stretched and the window contents update suddenly at the
end.
Comment 9 Giovanni Campagna 2014-07-08 10:09:51 UTC
Created attachment 280131 [details] [review]
WindowManager: improve destroy window animation

The animation is the same for modal dialogs, but it is now
run for non modal dialogs too (matching the new behavior on
show).
In addition, we run a destroy animation for normal windows,
if they use CSD (there are technical limitations that prevent
running animations after destroy on server decorated windows)
Comment 10 Allan Day 2014-07-08 11:43:35 UTC
Created attachment 280137 [details] [review]
tweak the patch set

I've spent a bit of time playing around with these patches, mostly looking at open/close window animations. The attached patch feels like an improvement to me - feel free to fold it into the patch set, if you agree.

A couple of points though:

 * These open/close animations don't really work when the window is maximized.
 * The maximize/unmaximize animations don't seem to work in general, probably due to GTK+ not handling the resize well.
 * The animation needs to be quicker when destroying modal dialogs - I've found that 0.10 works well.
Comment 11 Giovanni Campagna 2014-07-29 07:18:01 UTC
Created attachment 281912 [details] [review]
WindowManager: improve minimize/map animations

Using the parameters from Elementary's Gala, which is generally
considered a DE that cares about eye-candy.
Comment 12 Giovanni Campagna 2014-07-29 07:24:18 UTC
Created attachment 281913 [details] [review]
WindowManager: improve destroy window animation

The animation is the same for modal dialogs, but it is now
run for non modal dialogs too (matching the new behavior on
show).
In addition, we run a destroy animation for normal windows,
if they use CSD (there are technical limitations that prevent
running animations after destroy on server decorated windows)
Comment 13 Giovanni Campagna 2014-07-29 07:24:24 UTC
Created attachment 281914 [details] [review]
WindowManager: update animation timings after designer review

Lapo, Jakub and Allan all agree with this.
Comment 14 drago01 2014-07-29 08:50:01 UTC
Review of attachment 281912 [details] [review]:

::: js/ui/windowManager.js
@@ +891,3 @@
+    },
+
+    _shouldAnimateNormalActor: function(actor) {

Not sure I like this name what is a "normalActor" ? 

Also you only call it once ... can't you just open code it instead like you do for the "non normal" case ? i.e pass the types to shouldAnimateActor ?
Comment 15 drago01 2014-07-29 08:53:14 UTC
Review of attachment 281913 [details] [review]:

OK.
Comment 16 drago01 2014-07-29 08:53:51 UTC
Review of attachment 281914 [details] [review]:

OK.
Comment 17 Giovanni Campagna 2014-07-29 13:00:52 UTC
Pushed after addressing review comments.

Attachment 281912 [details] pushed as eda27d5 - WindowManager: improve minimize/map animations
Attachment 281913 [details] pushed as d4f0b5b - WindowManager: improve destroy window animation
Attachment 281914 [details] pushed as aa2fc3c - WindowManager: update animation timings after designer review