mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-07 04:17:00 +00:00
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:
@@ -1294,17 +1294,16 @@ class Spaces extends Map {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let next = to.clip.get_next_sibling();
|
|
||||||
|
|
||||||
let visible = new Map();
|
let visible = new Map();
|
||||||
for (let [monitor, space] of this.monitors) {
|
for (let [monitor, space] of this.monitors) {
|
||||||
visible.set(space, true);
|
visible.set(space, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
let scale = 0.9;
|
let scale = 0.9;
|
||||||
while (next !== null) {
|
for (const space of spaces.values()) {
|
||||||
if (!visible.get(next.space))
|
if (!visible.get(space)) {
|
||||||
Tweener.addTween(
|
Tweener.addTween(
|
||||||
next.first_child,
|
space.clip,
|
||||||
{ x: xDest,
|
{ x: xDest,
|
||||||
y: yDest,
|
y: yDest,
|
||||||
scale_x: scale,
|
scale_x: scale,
|
||||||
@@ -1315,10 +1314,10 @@ class Spaces extends Map {
|
|||||||
this.set_position(0, global.screen_height*0.1);
|
this.set_position(0, global.screen_height*0.1);
|
||||||
this.hide();
|
this.hide();
|
||||||
},
|
},
|
||||||
onCompleteScope: next.first_child
|
onCompleteScope: space.clip.first_child
|
||||||
});
|
});
|
||||||
|
|
||||||
next = next.get_next_sibling();
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user