Repository navigation
Conversation
AppIndicator applets never set ItemIsMenu and implement Activate as a no-op, so left-click on those tray icons did nothing. Prefer the menu whenever the item exposes one; Activate remains for menu-less items. Fixes #10339 Signed-off-by: fresh3nough <anonwurcod@proton.me>
|
Reviewed at a41ee1e against
So the reported bug is real and this fixes it. The second row is the problem. A smaller note on the test: Second opinion: Codex Medium reviewed the diff. It agreed the bug is real and fixed (its agreement is not guaranteed independent), and contributed the Qt adaptor's handling of |
Both sides appended assertions to test/shell.d/tray-test.sh; keep quattro's superwhisper and tray-section cases and this branch's left-click cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This branch stopped merging after Re-checked at dcae105 on a disposable Omarchy VM running the shell from each tree, with real left-clicks on two probe tray items (
My earlier finding still stands: left-click now opens the menu for every tray app that has one, which takes the click away from Qt apps that use No second opinion this time: the configured reviewer (Codex Medium) was out of reviews for the day. Only I (Claude Opus 5.5) checked the merge, by comparing it with both parents. Because of that, it does not get the |
|
| // Left-click: menu-only and AppIndicator items with a menu open the menu; | ||
| // items that only implement Activate still activate. | ||
| assert(tray.leftClickOpensMenu({ onlyMenu: true, hasMenu: false, menu: null }), 'tray opens menu when ItemIsMenu is set') | ||
| assert(tray.leftClickOpensMenu({ onlyMenu: false, hasMenu: true, menu: {} }), 'tray opens menu when hasMenu is set without ItemIsMenu') |
There was a problem hiding this comment.
This test also supplies a truthy menu, so it still passes if the hasMenu check is removed. Set menu: null here to test the hasMenu branch on its own. Keep the separate menu-handle case.
| assert(tray.leftClickOpensMenu({ onlyMenu: false, hasMenu: true, menu: {} }), 'tray opens menu when hasMenu is set without ItemIsMenu') | |
| assert(tray.leftClickOpensMenu({ onlyMenu: false, hasMenu: true, menu: null }), 'tray opens menu when hasMenu is set without ItemIsMenu') |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Classified again at dcae105, because the head moved with the merge of I checked Greptile's note on This waits on the maintainer: to settle what it is, and whether left-click should open the menu for every item that has one or only for AppIndicator items. |
Summary
Fixes #10339.
Left-click on menu-bearing tray icons only opened the menu when SNI
ItemIsMenuwas set. libayatana-appindicator never sets that property and implementsActivateas a silent no-op, so left-click on those icons did nothing even though a working menu was on the bus.TrayModel.leftClickOpensMenunow opens the menu whenonlyMenu,hasMenu, or a menu handle is present. Items with no menu still callactivate().Test plan
bash test/shell.d/tray-test.sh— covers ItemIsMenu, hasMenu-without-ItemIsMenu, menu handle, activate-only, and null itemonlyMenu=false,hasMenu=true): old path returns false, new path returns trueNotes
Right-click and middle-click are unchanged. Omarchy's own bar widgets are not SNI items and never reach this branch.