Fix broken startup

The workspace init loop doesn't like that workspaces aren't fully initialized
when running add_all_from_workspaces(workspace). (not sure why, since we really
should only be referencing workspaces[workspace.workspace_index] which is
initialized above the call.
This commit is contained in:
Tor Hedin Brønner
2017-09-11 20:45:31 +02:00
parent 067f911927
commit 402147fa7a
+3 -2
View File
@@ -44,7 +44,9 @@ function log() {
workspaces = []
workspaces[0] = []
for (let i=0; i < global.screen.n_workspaces; i++) {
workspaces[i] = []
}
focus = () => {
let meta_window = global.display.focus_window;
if (!meta_window)
@@ -248,7 +250,6 @@ dynamic_function_ref = (handler_name, owner_obj) => {
}
for (let i=0; i < global.screen.n_workspaces; i++) {
workspaces[i] = []
let workspace = global.screen.get_workspace_by_index(i)
print("workspace: " + workspace)
workspace.connect("window-added", dynamic_function_ref("add_handler"))