From aa1cc2894bf27b3e57f64d5db2e46bf497e945bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Fri, 27 Sep 2019 14:35:34 +0200 Subject: [PATCH] Fix reload visibility Clutter's transition framework will delay painting the ease until some sort of painting is requested or whatnat, even if duration == 0. In particular on reload this means clones are invisible for quite a while. Simply force positions on startup. --- tiling.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tiling.js b/tiling.js index 00e42d7..3a22c2f 100644 --- a/tiling.js +++ b/tiling.js @@ -241,6 +241,12 @@ class Space extends Array { animateWindow(w); }); this.layout(false); + // Force immediate painting of clones on reload + this.getWindows().forEach(w => { + let c = w.clone; + c.x = c.targetX; + c.y = c.targetY; + }); let selected = this.selectedWindow; if (selected) { @@ -351,7 +357,6 @@ class Space extends Array { Tweener.addTween(c, { x, y, time, - transition: 'easeInOutQuad', onComplete: this.moveDone.bind(this) }); }