Skip to content

tray: open overflow item menus at the icon - #4002

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
pblcp:fix/tray-overflow-menu-position
Oct 29, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
pblcp:fix/tray-overflow-menu-position

Conversation

@pblcp

@pblcp pblcp commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Description

Right-clicking a tray icon inside the overflow popup opens its menu at the left edge of the screen instead of under the icon.

In SystemTrayBar.qml the overflow grid is created with overflowPopout: overflowPopout. Inside TrayOverflowGrid, the right-hand side resolves to the grid's own (unset) overflowPopout property rather than the DPopout id, so it stays undefined. TrayOverflowGrid then adds no popup offset, and the popup-local click position (about 33 px) is passed on as a screen coordinate.

The fix binds through a typed property on the bar root (root.overflowPopoutRef).

Measured on a 1920 px top bar, standalone popouts, niri:

  • before: gx 33, menu at x 4
  • after: gx 1496, menu at x 1384–1600, under the icon

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

None found.

Screenshots / video

Before: the menu opens at the top-left corner while the icon sits in the overflow popup on the right.

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

The overflow grid bound overflowPopout to itself, so the popup offset was never added and right-click menus opened at the left screen edge.
@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found. The fix is correct: overflowPopout: overflowPopout inside TrayOverflowGrid resolved to the grid's own null property, and binding through the typed root.overflowPopoutRef restores the popout offset in the menu positioning.
Checked: SystemTrayBar.qml diff, TrayOverflowGrid overflowPopout usage, DPopout import and deprecation list. Model: claude-opus-5-5.

@bbedward
bbedward merged commit a1c8db2 into duxlabs-dev:master Oct 29, 2026
2 checks passed
dux-ci Bot pushed a commit that referenced this pull request Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants