addWindow: don't run layout automatically

Running two layouts after each other on wayland can cause the second
resize to be lost.

So avoid doing an automatic layout on addWindow giving the calling code
better control of the subsequent layout.
This commit is contained in:
Tor Hedin Brønner
2020-01-17 17:14:36 +01:00
parent 5adc6f1515
commit ce969e77f3
+1 -1
View File
@@ -587,7 +587,6 @@ class Space extends Array {
let workArea = this.workArea();
this.targetX = workArea.x + Math.round((workArea.width - this.cloneContainer.width)/2);
}
this.layout();
this.emit('window-added', metaWindow, index, row);
return true;
}
@@ -2380,6 +2379,7 @@ function insertWindow(metaWindow, {existing}) {
metaWindow.unmaximize(Meta.MaximizeFlags.BOTH);
toggleMaximizeHorizontally(metaWindow);
}
space.layout();
if (!existing) {
actor.opacity = 0;