You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set a menu during build as described in docs here
Then later in a command from front-end I set a a new menu but now the on_system_tray_event handler is no longer called.
I tried to replace the entire system tray but that causes the app to crash on right click. See stack trace.
I'm super new to Rust so this could very well all be incompetence. Grateful for any feedback / ideas. I've also opened a Stack Overflow issue to cover the incompetence situation
Reproduction
Updating the menu resulting in events no longer working
#[tauri::command]fnset_system_tray_menu(app:AppHandle){let menu = SystemTrayMenu::new().add_item(CustomMenuItem::new("test".to_string(),"Test"));match app.tray_handle().set_menu(menu){Ok(_) => {},Err(error) => panic!("Problem setting system tray menu: {}", error),};}
Replacing the menu causing a crash
fnset_system_tray_menu(app:AppHandle){let menu = SystemTrayMenu::new().add_item(CustomMenuItem::new("test".to_string(),"Test"));matchSystemTray::new().with_menu(menu).build(&app){Ok(_) => {},Err(error) => panic!("Problem setting system tray menu: {}", error),};}
Expected behavior
Either one of these:
The on_system_tray_event event handlers keep working
A way to assign new event handlers
Platform and versions
MacOS 12.6
Stack trace
2022-12-15 14:59:48.060 hotlist-tauri[49478:21361707] -[_WKInspectorConfiguration _setMenuOwner:]: unrecognized selector sent to instance 0x13e7ecdd0
thread 'main' panicked at 'Uncaught exception <NSException: 0x13e709a30>', /Users/rikschennink/.cargo/registry/src/github.com-1ecc6299db9ec823/cocoa-0.24.1/src/appkit.rs:3740:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Additional context
No response
The text was updated successfully, but these errors were encountered:
rikschennink
changed the title
[bug] when I set a new tray_menu I lose the on_system_tray_event
[bug] When I set a new system_tray_menu I lose the .on_system_tray_event() handler
Dec 15, 2022
rikschennink
changed the title
[bug] When I set a new system_tray_menu I lose the .on_system_tray_event() handler
[bug] When a new system_tray_menu is set the on_system_tray_event handler is no longer called
Dec 15, 2022
rikschennink
changed the title
[bug] When a new system_tray_menu is set the on_system_tray_event handler is no longer called
[bug] On MacOS when a new system_tray_menu is set the on_system_tray_event handler is no longer called
Dec 19, 2022
Describe the bug
I set a menu during build as described in docs here
Then later in a command from front-end I set a a new menu but now the
on_system_tray_event
handler is no longer called.I tried to replace the entire system tray but that causes the app to crash on right click. See stack trace.
I'm super new to Rust so this could very well all be incompetence. Grateful for any feedback / ideas. I've also opened a Stack Overflow issue to cover the incompetence situation
Reproduction
Updating the menu resulting in events no longer working
Replacing the menu causing a crash
Expected behavior
Either one of these:
on_system_tray_event
event handlers keep workingPlatform and versions
MacOS 12.6
Stack trace
Additional context
No response
The text was updated successfully, but these errors were encountered: