Open DefectingCat opened 7 months ago
Second this. Have similar code structure
.on_tray_icon_event(move |app, event| {
tauri_plugin_positioner::on_tray_event(app.app_handle(), &event);
// Use move to capture app_handle
if event.click_type == ClickType::Left {
println!("tray icon clicked");
// let window = app_handle.get_webview_window("editor").unwrap();
let mut win = app_handle.get_webview_window("editor").unwrap();
let _ = win.as_ref().window().move_window(Position::TrayCenter);
win.show();
win.set_focus().unwrap();
}
and it shows up some
where else on both screen in any kind of set up, single or double with monitor
When using
menu.move_window(Position::TrayCenter)?;
to put a system tray menu on the menu icon center, it's works on main monitor. But not any response in the extended monitor, also no error throwed.Main monitor:
Extended monitor:
Code: