fix: restore window from tray when status bar icon is present

This commit is contained in:
wonfen
2025-06-17 12:59:05 +08:00
parent ac7307b1f7
commit a67e8388a9
2 changed files with 13 additions and 1 deletions

View File

@@ -653,10 +653,13 @@ impl Tray {
"system_proxy" => feat::toggle_system_proxy(),
"tun_mode" => feat::toggle_tun_mode(None),
"main_window" => {
log::info!(target: "app", "Tray点击事件: 显示主窗口");
if crate::module::lightweight::is_in_lightweight_mode() {
log::info!(target: "app", "当前在轻量模式,正在退出轻量模式");
crate::module::lightweight::exit_lightweight_mode();
}
let _ = resolve::create_window(true);
let result = resolve::create_window(true);
log::info!(target: "app", "窗口创建/显示结果: {}", result);
}
_ => {}
}