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.
This commit is contained in:
Tor Hedin Brønner
2018-12-08 12:09:42 +01:00
parent 4de9d9a3dc
commit ffabbcb85a
+2 -3
View File
@@ -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;