opt: close main window when exit from tray on macOS

This commit is contained in:
Kingtous
2023-05-02 23:48:49 +08:00
parent a77b795c47
commit 3980e52a88
5 changed files with 41 additions and 7 deletions

View File

@@ -211,6 +211,7 @@ pub fn uninstall(show_new_window: bool) -> bool {
);
if uninstalled {
crate::ipc::set_option("stop-service", "Y");
let _ = crate::ipc::close_all_instances();
// leave ipc a little time
std::thread::sleep(std::time::Duration::from_millis(300));
std::process::Command::new("launchctl")