diff --git a/docs/testing.md b/docs/testing.md index 29bf1d4..fb00509 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -38,6 +38,8 @@ into separate layer-shell windows. - [ ] Fullscreen YouTube video uses the whole display - [ ] Leaving fullscreen restores the correct geometry above the dock - [ ] No first-run, default-browser or sign-in nag appears +- [ ] `chrome://policy` lists the Ekklesia policies as applied, with no + "unknown policy" entries - [ ] Chrome does not start by itself at boot - [ ] After a reboot, cookies and site logins are still there - [ ] After an OTA update, cookies and site logins are still there diff --git a/scripts/classroom-window b/scripts/classroom-window index 9d7a75c..81d5363 100755 --- a/scripts/classroom-window +++ b/scripts/classroom-window @@ -18,6 +18,11 @@ import sys HIDDEN_WORKSPACE = "__ekklesia_hidden" +# sway parks scratchpad windows on a workspace of its own. Nothing here +# puts them there, but treating it as hidden means a window left in the +# scratchpad by an older classroom build can still be restored. +HIDDEN_WORKSPACES = {HIDDEN_WORKSPACE, "__i3_scratch"} + STATE_DIR = os.path.join( os.environ.get("XDG_RUNTIME_DIR") or "/tmp", "ekklesia-classroom", @@ -77,7 +82,7 @@ def collect(node, workspace, found): "instance": properties.get("instance") or "", "focused": bool(node.get("focused")), "workspace": workspace, - "hidden": workspace == HIDDEN_WORKSPACE, + "hidden": workspace in HIDDEN_WORKSPACES, } ) @@ -119,11 +124,11 @@ def visible_workspace(): workspaces = query("get_workspaces") or [] for workspace in workspaces: - if workspace.get("focused") and workspace.get("name") != HIDDEN_WORKSPACE: + if workspace.get("focused") and workspace.get("name") not in HIDDEN_WORKSPACES: return workspace.get("name") for workspace in workspaces: - if workspace.get("visible") and workspace.get("name") != HIDDEN_WORKSPACE: + if workspace.get("visible") and workspace.get("name") not in HIDDEN_WORKSPACES: return workspace.get("name") return "1"