[gnome-shell/wip/swarm: 27/36] appDisplay: avoid allocation loop
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/swarm: 27/36] appDisplay: avoid allocation loop
- Date: Mon, 30 Jun 2014 12:31:30 +0000 (UTC)
commit c43b73d283a8cae339ff0278194a7753fe73eb77
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Thu Jun 19 11:41:47 2014 +0200
appDisplay: avoid allocation loop
js/ui/appDisplay.js | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 962adb6..f761110 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -459,7 +459,16 @@ const AllView = new Lang.Class({
function() {
if (this._grid.actor.mapped) {
this._grid.actor.disconnect(toAnimate);
- gridAnimationFunction();
+ // We need to avoid the clutter allocation loop, so we use
+ // a call before redraw, but also we need to hide items
+ // to not show them for a moment before the animation is
+ // started
+ this._grid.actor.opacity = 0;
+ Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this,
+ function() {
+ this._grid.actor.opacity = 255;
+ gridAnimationFunction();
+ }));
}
}));
} else {
@@ -745,7 +754,16 @@ const FrequentView = new Lang.Class({
function() {
if (this._grid.actor.mapped) {
this._grid.actor.disconnect(toAnimate);
- gridAnimationFunction();
+ // We need to avoid the clutter allocation loop, so we use
+ // a call before redraw, but also we need to hide items
+ // to not show them for a moment before the animation is
+ // started
+ this._grid.actor.opacity = 0;
+ Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this,
+ function() {
+ this._grid.actor.opacity = 255;
+ gridAnimationFunction();
+ }));
}
}));
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]