tauri-apps / tray-icon

Tray icons for Desktop Applications.
Apache License 2.0
211 stars 29 forks source link

Tray click events on linux not firing #104

Open svefro opened 10 months ago

svefro commented 10 months ago

Are not triggered on linux.

I have found out that this is due to a limit in libappindicator used on linux.

Is it possible to switch to another lib or to submit a feature request to the maintainers of libappindicator? I can not find it.

amrbashir commented 9 months ago

The situation on Linux is in a weird state, libappindicator is deprecated and the new maintained version is libayatana-appindicator which still doesn't support the click events, there is also KDE/freedesktop StatusNotifierItem specification and there is an implementation of it here https://github.com/iovxw/ksni but I am not sure if it supports that either or if other distros other than KDE support it.

svefro commented 9 months ago

It's always in a weird state on linux :p Thanks for the informative and quick reply.

I guess that getting this to work on KDE is better than no linux distros. Anyway i think the issue should remain open until it has been resolved so it is a fully featured tray icon.

Maybe this crate should switch to use https://github.com/iovxw/ksni "under the hood"? At least if running on KDE.

vangork commented 9 months ago

It works well with Tauri 1.x.

FabianLars commented 9 months ago

The menu events yes, but not clicks on the icon itself. That never worked on v1 either.

vangork commented 9 months ago

Okey. BTW, since tauri 2.0.0 removed get_item() method in the app_handle.tray(), how to change the title for an existing menu item? @FabianLars

amrbashir commented 9 months ago

Please keep this issue for discussing Linux tray click events only. If you need help with anything, reach out to us on Discord.