From a3a4b6becc33967ae0cef516881690bb0fd78fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Sun, 23 Jun 2019 19:10:24 +0200 Subject: [PATCH] wip --- tiling.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tiling.js b/tiling.js index 299c2db..1143e2c 100644 --- a/tiling.js +++ b/tiling.js @@ -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); };