mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
fix: wake window correctly on first silent startup
This commit is contained in:
@@ -339,17 +339,19 @@ impl WindowManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
match build_new_window().await {
|
||||
Ok(_) => {
|
||||
let window = match build_new_window().await {
|
||||
Ok(window) => {
|
||||
logging!(info, Type::Window, "新窗口创建成功");
|
||||
window
|
||||
}
|
||||
Err(e) => {
|
||||
logging!(error, Type::Window, "新窗口创建失败: {}", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if WindowOperationResult::Failed == Self::show_main_window().await {
|
||||
// 直接激活刚创建的窗口,避免因防抖导致首次显示被跳过
|
||||
if WindowOperationResult::Failed == Self::activate_window(&window) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user