ags: make not crash in sway

This commit is contained in:
end-4
2024-01-12 21:27:49 +07:00
parent 85704218e3
commit 8cf0f02b56
18 changed files with 253 additions and 215 deletions
@@ -26,7 +26,7 @@ const WorkspaceContents = (count = 10) => {
let workspaceMask = 0;
for (let i = 0; i < workspaces.length; i++) {
const ws = workspaces[i];
if (ws.id < 0) continue; // Ignore scratchpads
if (ws.id <= 0) continue; // Ignore scratchpads
if (ws.id > count) return; // Not rendered
if (workspaces[i].windows > 0) {
workspaceMask |= (1 << ws.id);