mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-05 11:46:57 +00:00
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:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user