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

This commit is contained in:
Tunglies
2025-11-01 10:09:51 +08:00
parent 52545a626c
commit c0e111e756
6 changed files with 90 additions and 132 deletions
+7
View File
@@ -10,6 +10,8 @@ mod feat;
mod module;
mod process;
pub mod utils;
#[cfg(target_os = "macos")]
use crate::module::lightweight;
#[cfg(target_os = "linux")]
use crate::utils::linux;
#[cfg(target_os = "macos")]
@@ -287,6 +289,11 @@ pub fn run() {
pub async fn handle_reopen(has_visible_windows: bool) {
handle::Handle::global().init();
if lightweight::is_in_lightweight_mode() {
lightweight::exit_lightweight_mode().await;
return;
}
if !has_visible_windows {
handle::Handle::global().set_activation_policy_regular();
let _ = WindowManager::show_main_window().await;