Skip to content

[TrayIcon] Unify tray menus with WinUI on Windows 10 and 11 - #931

Merged
neon-nyan merged 4 commits into
CollapseLauncher:mainfrom
Aegisir:winui-tray-menu
Nov 14, 2026
Merged

neon-nyan merged 4 commits into
CollapseLauncher:mainfrom
Aegisir:winui-tray-menu

Conversation

@Aegisir

@Aegisir Aegisir commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Main Goal

Image Image image

Use a WinUI tray menu on Windows 10 &11, fixing extra host-window borders.

PR Status :

  • Overall Status : Done
  • Commits : Done (27c1570c)
  • Synced to base (Collapse:main) : Yes (d478585d)
  • Build status : OK (Debug & Release)
  • Crashing : No in checks
  • Bug found caused by PR : 0 in checks

Changelog

  • [New] Use WinUI tray menu for Windows 10 & 11.

  • [New] Add Fluent-icon for buttons (I tried to make it refresh menu state before opening, and create the reusable host on demand)

  • [Fix] Extra borders or background from appearing around the menu.

  • Debug & Release build successfully.

  • completed checks and test on Windows builds 17763&18362,&26300

@Aegisir

Aegisir commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

I fixed the Win10 border by clearing WS_OVERLAPPEDWINDOW, setting WS_POPUP, and applying SWP_FRAMECHANGED on the hidden host (source). ShouldConstrainToRootBounds = false lets the menu render outside the zero-sized host. This may resolve the extra border in our Win10 tests while keeping the standard WinUI MenuFlyout.

btw the extra border came from the hidden host window. I removed its WS_OVERLAPPEDWINDOW styles, set WS_POPUP, and applied SWP_FRAMECHANGED. Setting ShouldConstrainToRootBounds = false lets the WinUI menu render outside the zero-sized host

@neon-nyan neon-nyan left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the above changes are looking good for me so far. Also, I would prefer to have some improvements as per comments here. Let me know if you have other approaches or opinions about these.

@neon-nyan
neon-nyan merged commit 5ea2ae9 into CollapseLauncher:main Nov 14, 2026
8 of 9 checks passed
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