From ffabbcb85aa5c13b6901e177a8b9fb71d8ae7d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Sat, 8 Dec 2018 11:58:07 +0100 Subject: [PATCH] layout: better tween guard Turning off fullscreen would desync `c.targetY` and `c.y`. Simply make the guard robust by making sure they are synced before foregoing tweening. This should work better than making sure that we're always syncing the target everywhere. We also shouldn't need to tween when `widthChanged`, if the clone doesn't move we should be able to activate the window. If the layout initiates a scroll `moveDone` won't activate any windows anyways. --- tiling.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tiling.js b/tiling.js index 550669e..5ea5452 100644 --- a/tiling.js +++ b/tiling.js @@ -312,9 +312,8 @@ class Space extends Array { } let c = w.clone; - if (widthChanged || - c.targetX !== x || - c.targetY !== y) { + if (c.x !== x || c.targetX !== x || + c.y !== y || c.targetY !== y) { c.targetX = x; c.targetY = y;