Files
FlClash/macos/Runner/AppDelegate.swift
T
chen08209 1e97716636 feat(platform): move desktop windows to plugins/window and rework the tray
plugins/window replaces the window_manager fork on every desktop.

Changelog: Tray hotkeys, node delays and a delay test
2026-09-30 11:39:58 +08:00

26 lines
738 B
Swift
Executable File

import Cocoa
import FlutterMacOS
import window
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return false
}
override func applicationShouldTerminate(_ sender: NSApplication) -> NSApplication.TerminateReply {
WindowPlugin.instance?.handleShouldTerminate()
return .terminateCancel
}
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
WindowPlugin.instance?.handleReopen()
return false
}
}