Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Be able to set default system tray item on Windows #11339

Closed
lars-berger opened this issue Oct 13, 2024 · 1 comment · Fixed by #11354
Closed

[feat] Be able to set default system tray item on Windows #11339

lars-berger opened this issue Oct 13, 2024 · 1 comment · Fixed by #11354

Comments

@lars-berger
Copy link
Contributor

Describe the problem

Via SetMenuDefaultItem, an option in the system tray can be emphasized and marked as default. Like so:

image
Show Bluetooth Devices is the default item

This requires the HMENU handle to the menu, which is currently inaccessible through the Tauri system tray API. It is, however, accessible through hpopupmenu() in the tray_icon crate.

Describe the solution you'd like

Either:

  1. Expose hpopupmenu() to get the HMENU handle as done in the tray_icon crate. Devs can then call SetMenuDefaultItem themselves.
  2. Be able to pass a flag via the MenuBuilder API to mark an item as default.

Alternatives considered

No response

Additional context

No response

@amrbashir
Copy link
Member

I have exposed the API in #11354, as I couldn't find an equivalent API for SetMenuDefaultItem on Linux and macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants