mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 07:03:45 +08:00
parent
16381d1895
commit
6e6462742c
@ -11,6 +11,7 @@
|
||||
- 首页“代理模式”快速切换导致的卡死问题
|
||||
- 解锁测试报错信息
|
||||
- Macos 快捷键关闭窗口无法启用自动轻量模式
|
||||
- 静默启动异常窗口创建和关闭流程
|
||||
|
||||
## v2.2.3
|
||||
|
||||
|
@ -123,6 +123,11 @@ pub async fn resolve_reset_async() {
|
||||
|
||||
/// create main window
|
||||
pub fn create_window(is_showup: bool) {
|
||||
if !is_showup {
|
||||
logging!(info, Type::Window, "Not to display create window");
|
||||
return;
|
||||
}
|
||||
|
||||
logging!(info, Type::Window, true, "Creating window");
|
||||
|
||||
let app_handle = handle::Handle::global().app_handle().unwrap();
|
||||
@ -196,17 +201,8 @@ pub fn create_window(is_showup: bool) {
|
||||
match window {
|
||||
Ok(window) => {
|
||||
logging!(info, Type::Window, true, "Window created successfully");
|
||||
if is_showup {
|
||||
let _ = window.show();
|
||||
let _ = window.set_focus();
|
||||
} else {
|
||||
let _ = window.hide();
|
||||
#[cfg(target_os = "macos")]
|
||||
AppHandleManager::global().set_activation_policy_accessory();
|
||||
}
|
||||
|
||||
// 设置窗口状态监控,实时保存窗口位置和大小
|
||||
// crate::feat::setup_window_state_monitor(&app_handle);
|
||||
let _ = window.show();
|
||||
let _ = window.set_focus();
|
||||
|
||||
// 标记前端UI已准备就绪,向前端发送启动完成事件
|
||||
let app_handle_clone = app_handle.clone();
|
||||
|
Loading…
x
Reference in New Issue
Block a user