mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-06 03:56:53 +00:00
wip
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user