Draw the third menu level reliably, on every application #16
No reviewers
Labels
No labels
⏳in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/someones.computer_tray!16
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/third-level-menu-drawing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the platform's #844 — the third level of the menu (where the deployment gestures live) drew only under the first application; every later application's gesture submenu mapped as an empty strip, so its
Activate/Confirm stopcould not be clicked or keyboarded.After — the second application's gesture, the row that used to be unreachable, now drawn (this capture is committed by the suite and is its regression sentinel):
Before (attached below as
before-empty-strip.png): the same walk step photographed the submenu as a ~50×12px empty strip — on gtk-sni-tray and on xfce4-panel, which is the second, real-desktop host #844 asked for before any fix, and what pins the bug on the app side rather than on the harness.Mechanism
Upstream systray v1.12.2 clamps only the first
GetLayoutafter a reset to depth 1 (its libdbusmenu-gtk3 workaround). That protects the top level and pushes the same race one level down: the full-depth refetch introduces levels two and three in one reply, and GTK hosts silently drop children whose parent GtkMenu containers don't exist yet.The fix (house patch, marked in the file)
vendor/fyne.io/systray/systray_menu_unix.go: track which node ids the host has received; serve a node's children only once the node itself was served in an earlier reply; schedule a refresh whenever anything was withheld. Upstream's own cadence, per level instead of once. A fully-seen tree serves full-depth in one reply (steady-state retitles cost nothing), and branches appearing later are introduced progressively too. Worth offering upstream — follow-up.Suite changes the fix unlocks
Activate mainunder the second application deliberately — if the fix regresses, that walk step fails the run instead of committing a lie.GOTO_DEPTH2 → 3 (the menu's real depth; still refuses deeper walks).HOST=xfce4-panelstays available as a manual knob for splitting the next drawing bug the same way.Verified
go vetclean,hack/lint.sh0 issues,hack/coverage.shat floors (patch is vendor-only Go; suite/scene changes carry the behavioural proof).WIP: Draw the third menu level reliably, on every applicationto Draw the third menu level reliably, on every applicationPull request closed