fix(client/macos): 最小化托盘后点 Dock 图标唤回窗口(1.0.48+49)

windowManager.hide() 走 orderOut: 后主窗口不可见,点 Dock 图标系统只发
applicationShouldHandleReopen(hasVisibleWindows=false),AppDelegate 未接管 →
点了没反应。AppDelegate 实现该回调,无可见窗口时 makeKeyAndOrderFront +
activate 唤回 mainFlutterWindow。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-02 10:50:40 +08:00
parent 76126f7a0c
commit 8937044f55
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -12,4 +12,14 @@ class AppDelegate: FlutterAppDelegate {
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
// Dock window_manager.hide()(orderOut:)
// hasVisibleWindows=false, reopen ;""
override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
if !flag {
mainFlutterWindow?.makeKeyAndOrderFront(nil)
NSApp.activate(ignoringOtherApps: true)
}
return true
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
name: pangolin_vpn
description: 穿山甲 · Pangolin — 极简、稳定、跨平台网络加速客户端。
publish_to: "none"
version: 1.0.47+48
version: 1.0.48+49
environment:
sdk: ^3.5.0