mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Force tray process to exit if Quit
This commit is contained in:
@@ -167,7 +167,7 @@ fn main() -> Result<()> {
|
||||
if let Ok(lock) = config.lock() {
|
||||
if !lock.run_in_background {
|
||||
slint::quit_event_loop().unwrap();
|
||||
return;
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::{Read, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::exit;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
@@ -108,7 +109,10 @@ pub fn init_tray(
|
||||
if let TrayEvent::Menu(action) = event {
|
||||
match action {
|
||||
TrayAction::Open => open_app(),
|
||||
TrayAction::Quit => quit_app(),
|
||||
TrayAction::Quit => {
|
||||
quit_app();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user