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

+13 -3
View File
@@ -184,11 +184,13 @@ fn DesktopShell::open_dock_menu(
}
if it.pinned {
rows.push(dock_row("Unpin from dock", 8, it.id))
let pinned = items.filter(x => x.pinned).length()
if i > 0 {
// Its place among the pins (the dock may show running pins after the idle ones).
let pins = dock_config(w).pins(self.apps)
let at = pins.search(it.id).unwrap_or(i)
if at > 0 {
rows.push(dock_row("Move left", 9, it.id, value="-1"))
}
if i < pinned - 1 {
if at < pins.length() - 1 {
rows.push(dock_row("Move right", 9, it.id, value="1"))
}
} else {
@@ -467,3 +469,11 @@ fn DesktopShell::dock_click(self : DesktopShell, w : Widget) -> Bool {
self.toggle_launcher()
true
}
///| The app ids of the first dock's items, in the order it shows them.
pub fn DesktopShell::dock_item_ids(self : DesktopShell) -> Array[String] {
match self.dock_widget() {
Some(w) => self.dock_state(w).1.map(it => it.id)
None => []
}
}