Dock: plain icons always come before the task pills
CI / test (push) Failing after 2m33s

With window titles on, a pinned app that was running drew as a pill in its
pin slot, so idle pinned icons ended up between pills. Now the dock shows
the pinned apps that aren't running first, then every task: running pinned
apps in pin order, then the other running apps. The divider sits between
the two groups. Squeezing the pills to icons keeps the order; with titles
off the plain pinned order stays. Move left / right in the menu follow the
pin list, not the shown position.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiPCFHRxaJQvwex6ry
This commit is contained in:
Claude committed 2026-11-26 01:53:43 +00:00
1 parent 5403777451
commit 01bd8281d5
5 files changed
+72 -26

No files matched your search

+9 -5
View File
@@ -113,21 +113,25 @@ test "the dock is the panel's task manager: empty + opens Applications, pin from
}
f
}
super_key(comp, 3U, 40U) // Super+2
// Vim isn't running, so its icon comes first, then the tasks: Writer, Calc (pin order).
assert_eq(comp.shell.dock_item_ids(), ["vim", "libreoffice-writer", "libreoffice-calc"])
super_key(comp, 4U, 40U) // Super+3
assert_eq(focused(), "Budget.ods")
super_key(comp, 2U, 50U) // Super+1: Writer's newest window, then its other one
super_key(comp, 3U, 50U) // Super+2: Writer's newest window, then its other one
assert_eq(focused(), "Notes.odt")
super_key(comp, 2U, 60U)
super_key(comp, 3U, 60U)
assert_eq(focused(), "Report.odt")
// Writer's menu lists its two windows by title; picking one brings it forward.
let r = comp.shell.slot_rect(slot)
click_at(comp, r.x + 6 + 12, r.y + r.h / 2, 70U, btn=273U)
let writer_x = r.x + 6 + 24 + 6 + 11 + 20 // after Vim's icon and the divider
click_at(comp, writer_x, r.y + r.h / 2, 70U, btn=273U)
assert_eq(comp.shell.menu_title, "LibreOffice Writer")
let labels = comp.shell.menu_rows.map(r => r.label)
assert_true(labels.contains("Report.odt") && labels.contains("Notes.odt"))
ignore(@sys.write_file_bytes("_build/dock_bar_menu.png", @renderer.encode_png(comp.compose_frame())))
dock_pick(comp, "Notes.odt", 80U)
ignore(comp.compose_frame())
assert_eq(focused(), "Notes.odt")
comp.handle_input(@nested.InputEvent::PointerMove((r.x + 6 + 30 + 12).to_double(), (r.y + r.h / 2).to_double()), 90U)
comp.handle_input(@nested.InputEvent::PointerMove((r.x + 6 + 12).to_double(), (r.y + r.h / 2).to_double()), 90U)
ignore(@sys.write_file_bytes("_build/dock_bar.png", @renderer.encode_png(comp.compose_frame())))
}