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 736148 - Some fixes on swarm animation for quick users
Some fixes on swarm animation for quick users
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.14.x
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
3.14.2
: 769779 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-09-05 18:00 UTC by Carlos Soriano
Modified: 2017-07-19 08:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
iconGrid: Remove clones on new animation (2.98 KB, patch)
2014-09-05 18:00 UTC, Carlos Soriano
none Details | Review
appDisplay: Avoid random activations of spring animation (1.97 KB, patch)
2014-09-05 18:00 UTC, Carlos Soriano
none Details | Review
appDisplay: Use ::paint handler to set up spring animation (2.06 KB, patch)
2017-07-19 00:02 UTC, Florian Müllner
committed Details | Review
iconGrid: Remove clones on new animation (2.60 KB, patch)
2017-07-19 00:02 UTC, Florian Müllner
committed Details | Review
iconGrid: Cancel animations on unmap (1.24 KB, patch)
2017-07-19 00:02 UTC, Florian Müllner
committed Details | Review

Description Carlos Soriano 2014-09-05 18:00:18 UTC
This solves some annoyances when opening and closing the app picker very
quick
Comment 1 Carlos Soriano 2014-09-05 18:00:22 UTC
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.
Comment 2 Carlos Soriano 2014-09-05 18:00:31 UTC
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.
Comment 3 Florian Müllner 2017-07-19 00:01:34 UTC
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?
Comment 4 Florian Müllner 2017-07-19 00:02:07 UTC
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.
Comment 5 Florian Müllner 2017-07-19 00:02:28 UTC
Created attachment 355899 [details] [review]
iconGrid: Remove clones on new animation

Rebased to master.
Comment 6 Florian Müllner 2017-07-19 00:02:43 UTC
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.
Comment 7 Florian Müllner 2017-07-19 01:25:56 UTC
*** Bug 769779 has been marked as a duplicate of this bug. ***
Comment 8 Carlos Soriano 2017-07-19 07:17:40 UTC
Review of attachment 355898 [details] [review]:

Sounds good
Comment 9 Carlos Soriano 2017-07-19 07:19:05 UTC
Review of attachment 355899 [details] [review]:

yay
Comment 10 Carlos Soriano 2017-07-19 07:21:00 UTC
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?
Comment 11 Florian Müllner 2017-07-19 08:50:37 UTC
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