Bugfix: non-active spaces was not hidden on ending animation

Due to `to.clip` being the top actor combined with ClutterActor.get_next_sibling
returning null for top actors. (ie. it doesn't wrap)

Iterate to the spaces instead of using get_previous_sibling to avoid subtle
dependency on `to` being the top.

This bug cased a quite large performance drop. Clutter FPS halved on my
setup (10+ workspaces) during certain operations.
This commit is contained in:
Ole Jørgen Brønner
2018-09-15 17:34:52 +02:00
parent 37a2d6f52e
commit c439124dc8
+6 -7
View File
@@ -1294,17 +1294,16 @@ class Spaces extends Map {
}
});
let next = to.clip.get_next_sibling();
let visible = new Map();
for (let [monitor, space] of this.monitors) {
visible.set(space, true);
}
let scale = 0.9;
while (next !== null) {
if (!visible.get(next.space))
for (const space of spaces.values()) {
if (!visible.get(space)) {
Tweener.addTween(
next.first_child,
space.clip,
{ x: xDest,
y: yDest,
scale_x: scale,
@@ -1315,10 +1314,10 @@ class Spaces extends Map {
this.set_position(0, global.screen_height*0.1);
this.hide();
},
onCompleteScope: next.first_child
onCompleteScope: space.clip.first_child
});
next = next.get_next_sibling();
}
}
}