fix: resolve macOS lightweight mode exit synchronization issues and improve logging levels #5241

This commit is contained in:
Tunglies
2025-11-01 10:07:29 +08:00
parent 52545a626c
commit c0e111e756
6 changed files with 90 additions and 132 deletions

View File

@@ -11,10 +11,7 @@ use crate::{
tray::Tray,
},
logging, logging_error,
module::{
lightweight::{auto_lightweight_mode_init, run_once_auto_lightweight},
signal,
},
module::{lightweight::auto_lightweight_boot, signal},
process::AsyncHandler,
utils::{init, logging::Type, server, window_manager::WindowManager},
};
@@ -71,8 +68,7 @@ pub fn resolve_setup_async() {
tray_init,
init_timer(),
init_hotkey(),
init_auto_lightweight_mode(),
init_once_auto_lightweight(),
init_auto_lightweight_boot(),
);
});
}
@@ -128,12 +124,8 @@ pub(super) async fn init_hotkey() {
logging_error!(Type::Setup, Hotkey::global().init().await);
}
pub(super) async fn init_once_auto_lightweight() {
run_once_auto_lightweight().await;
}
pub(super) async fn init_auto_lightweight_mode() {
logging_error!(Type::Setup, auto_lightweight_mode_init().await);
pub(super) async fn init_auto_lightweight_boot() {
logging_error!(Type::Setup, auto_lightweight_boot().await);
}
pub(super) fn init_signal() {

View File

@@ -359,7 +359,6 @@ impl WindowManager {
}
return WindowOperationResult::Destroyed;
}
logging!(warn, Type::Window, "窗口摧毁失败");
WindowOperationResult::Failed
}