This commit is contained in:
Tor Hedin Brønner
2019-06-23 19:10:31 +02:00
parent 753ae5ccfb
commit a3a4b6becc
+9 -3
View File
@@ -98,7 +98,7 @@ function init() {
To transform a stage point to space coordinates: `space.actor.transform_stage_point(aX, aY)`
*/
class Space extends Array {
constructor (workspace, container) {
constructor (workspace, container, doInit) {
super(0);
this.workspace = workspace;
this.signals = new utils.Signals();
@@ -214,7 +214,8 @@ class Space extends Array {
this.leftStack = 0; // not implemented
this.rightStack = 0; // not implemented
this.init();
if (doInit)
this.init();
}
init() {
@@ -1091,6 +1092,9 @@ class Space extends Array {
this.clip.destroy();
this.cloneContainer = null;
let workspace = this.workspace;
// imports.misc.util.spawn(['tilix'])
}
}
Signals.addSignalMethods(Space.prototype);
@@ -1116,6 +1120,7 @@ class Spaces extends Map {
constructor() {
super();
this._initDone = false;
this.clickOverlays = [];
this.signals = new utils.Signals();
this.stack = [];
@@ -1182,6 +1187,7 @@ class Spaces extends Map {
allocateClone(w.get_compositor_private());
this.signals.connect(w, 'size-changed', resizeHandler);
});
this._initDone = true;
this.forEach(space => space.init());
@@ -1627,7 +1633,7 @@ class Spaces extends Map {
}
addSpace(workspace) {
let space = new Space(workspace, this.spaceContainer);
let space = new Space(workspace, this.spaceContainer, this._initDone);
this.set(workspace, space);
this.stack.push(space);
};