Open Czxck001 opened 1 month ago
idk why i got notified for this issue today (deleted message?) but on my machine (m2 pro 15.1) your code works fine actually.
could this be a problem with macos 15.0 maybe? i don't think i've tried it when i was on that version. It wouldn't be the first time that a macos update broke parts of the tray icon.
Yes, that was me. I was having a similar issue, but in my case it was because I had registered the on_tray_icon_event
twice.
Describe the bug
It seems
on_tray_icon_event
can only receiveTrayIconEvent::Enter
,TrayIconEvent::Move
andTrayIconEvent::Leave
when mouse cursor is hovering on the tray icon, but won't be able to receiveTrayIconEvent::Click
when the user clicks on the icon.Reproduction
Just create a blank tauri app and change the
lib.rs
as the following:Expected behavior
The program should print
TrayIconEvent::Click
to the console when user clicks the icon, and be able to match the Click event accordingly, and printTray icon clicked
. However, as mentioned, it appears only to receive and printEnter
,Move
andLeave
:Full
tauri info
outputStack trace
Additional context
No response