GNOME Bugzilla – Bug 736148
Some fixes on swarm animation for quick users
Last modified: 2017-07-19 08:50:53 UTC
This solves some annoyances when opening and closing the app picker very quick
Created attachment 285513 [details] [review] iconGrid: Remove clones on new animation Until now we were waiting the animation to complete to allow the user to make a new animation. This could bring some problems and annoy nervous users. Instead of that, destroy clones on new animations triggers and create a new animation with the new direction.
Created attachment 285514 [details] [review] appDisplay: Avoid random activations of spring animation We currently connect to the allocation signal of the grid in BaseViewApp to start an animation. It brings one problem though, if we connect to that signal at some moment that the allocation is already stable, the next time it allocates will animate unconditionally. That's the case of for example if we exit and enter quickly the app picker, since the allocation is stable when going out and we connect to the allocation signal when going in, but the allocation is already stable. Since allocation can be done although the actor is not mapped, we could end with a random spring animation while accessing the overview the next time. To avoid that, make sure the grid is mapped when animating. Still this solution makes the animation to open the app picker in this case to not be triggered, but at least we don't animate randomly.
Grrr, not sure why this went off the radar. I just found this now when working on something related, so I'll - rebase the first patch to master - attach an alternative to the second patch - add an additional fix for a related issue Carlos, mind taking a look?
Created attachment 355898 [details] [review] appDisplay: Use ::paint handler to set up spring animation The animation needs the icons' final positions, so we currently defer it to a ::notify::allocation handler; however as starting the animation during an allocation cycle would trigger a Clutter warning, it is further deferred to a MetaLater. While this usually works, it is possible that the allocation is already valid when we connect the signal, in which case the animation is triggered at a later unexpected time. Switch to a more robust ::paint handler instead, which also allows us to get rid of the double-delay.
Created attachment 355899 [details] [review] iconGrid: Remove clones on new animation Rebased to master.
Created attachment 355900 [details] [review] iconGrid: Cancel animations on unmap We now cancel animations on override, however we also want to cancel animations altogether on unmap (that is, when hiding the overview) to avoid icons swarming into the void.
*** Bug 769779 has been marked as a duplicate of this bug. ***
Review of attachment 355898 [details] [review]: Sounds good
Review of attachment 355899 [details] [review]: yay
Review of attachment 355900 [details] [review]: Makes sense, a little not obvious on the code if we don't know this info. Maybe worth a comment?
Attachment 355898 [details] pushed as c67eaba - appDisplay: Use ::paint handler to set up spring animation Attachment 355899 [details] pushed as 96a4977 - iconGrid: Remove clones on new animation Attachment 355900 [details] pushed as 865a1cf - iconGrid: Cancel animations on unmap