Repository navigation
Fix context menus for Wine tray items - #9245
clementrog wants to merge 6 commits into
Conversation
|
Reviewed at ab1a35e against Reproduced on an Omarchy worker VM (Quickshell 0.3.1, the version Omarchy ships), using a stand-in tray item with Id
Upstream Quickshell has since stopped treating One thing to know about, not a blocker: the coordinates are layout coordinates, but Wine reads them as X11 screen coordinates, and Omarchy sets The second opinion (Codex Medium) did not run: the reviewer's daily quota was spent. This was reviewed by Claude Opus 5.5 alone. It is labelled |
TrayModel.js conflicted where quattro added widgetsForTrayItems beside usesNativeContextMenu; both are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch had stopped merging cleanly into Re-checked at e33e8fb on an Omarchy worker VM (Quickshell 0.3.1), using the same stand-in tray item as before (Id
This fixes #15057, which reports the same Battle.net symptom. I couldn't link the two yet because the item's classification has to be confirmed again at the new head first. The second opinion (Codex Medium) didn't run again this time: today's review quota was spent before this pull request came up. Claude Opus 5.5 reviewed it alone, so it isn't labelled |
[Medium impact] The PR appears safe to merge; no actionable issues remain in the reviewed changes. SummaryAdds a native context-menu path for tray items without a D-Bus menu.
No new actionable issues were found. Runtime tests were not run during this review.
|
|
Tested the same approach locally on quickshell 0.3.2 (a cloned tray calling |
Quickshell 0.3.2 hands an item whose Menu is /NO_DBUSMENU over with no menu at all, and display() then only logs "No menu present", so routing on the wine- id alone leaves every other menu-less item with a dead right-click. Route on a missing menu as well, keeping the wine- match for 0.3.1, which still treats the sentinel as a menu. The helper now reads each item's properties in one call with a 1-second timeout, so an app that stops answering cannot stall the lookup, and refuses to choose when several registered items share the id: Quickshell gives no bus address, so picking one could open another instance's menu. It resolves through OMARCHY_PATH rather than the bar, so the Tray widget works without one. The end-to-end test drives the real Tray widget against a mock item with no D-Bus menu and checks its ContextMenu is called, then adds a twin and checks the helper opens neither. Co-Authored-By: lkshrk <5067446+lkshrk@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Omarchy's AGENTS.md asks for the area's existing test file to be extended rather than a new one added. The twin-item case is left to tray-menu-test.sh, which checks it against real registered items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Omarchy's quickshell package is 0.3.2, which reports Wine's /NO_DBUSMENU as no menu, and the shell only reaches users together with it. Matching wine- ids as well served only 0.3.1, and sent a wine- item that does publish a D-Bus menu to the helper, which refuses it, instead of to the tray's own popup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I brought this up to date with What changed on your branch (fce0275, 09fa90c, 7b46ac2, d7b3024):
Checked on an Omarchy worker VM (Quickshell 0.3.2): the new end-to-end test fails on Second opinion: Codex Medium reviewed every round and found no defects. muse-wonder (pi, thinking high) reviewed the last two rounds and found none either. They read the same tree I did, so their agreement isn't guaranteed to be independent. Two questions are still open, both for the maintainer rather than for you. The coordinates are layout coordinates, without the |
Wine builds tray Ids from window handles, so apps in two prefixes can collide, and Quickshell gives no bus name to tell them apart. Picking the first match could open the other app's menu, so refuse instead. From #9245's helper, by @clementrog.
|
Thanks @clementrog! Your right-click fix shipped in #18597, along with the double-click fix and a change to the Battle.net window rule. The duplicate-Id guard came straight from this PR, and you're credited as a co-author on the merge commit. Closing this one since #18597 covers it. |
What changed
ContextMenumethod instead of trying to render/NO_DBUSMENUas a DBusMenuStatusNotifierWatcher, verify both its Wine id and/NO_DBUSMENUsentinel, then forward the click's screen coordinatesWhy
Battle.net running through GE-Proton registers a live status notifier item like this:
The current tray treats that sentinel as a real DBusMenu object. Right-clicking therefore logs DBus
UnknownMethoderrors and renders nothing, which also makes Battle.net'sExitaction inaccessible.The freedesktop Status Notifier Item specification defines
ContextMenu(INT x, INT y)for exactly this right-click fallback, with coordinates in screen space.Verification
bash test/shell.d/tray-test.shbash test/shell.d/tray-context-menu-test.sh./test/cli./test/all: both new tray test files pass in the full run. Seven unrelated host-environment checks initially failed; each was rerun successfully with its expected companion checkout or host access. The URL-checker absence case also passes with an isolated PATH, because this Omarchy machine already has the checker installed globally.wine-0x200d4-0and/NO_DBUSMENU, ran the exact helper from this branch, and visually confirmed the native menu opens with itsExitactionThe branch is rebased onto current
quattro.Fixes #15057