mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-04 11:59:18 +08:00
24 lines
667 B
Swift
24 lines
667 B
Swift
import Cocoa
|
|
import FlutterMacOS
|
|
|
|
@NSApplicationMain
|
|
class AppDelegate: FlutterAppDelegate {
|
|
var lauched = false;
|
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
|
dummy_method_to_enforce_bundling()
|
|
return true
|
|
}
|
|
|
|
override func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool {
|
|
if (lauched) {
|
|
handle_applicationShouldOpenUntitledFile();
|
|
}
|
|
return true
|
|
}
|
|
|
|
override func applicationDidFinishLaunching(_ aNotification: Notification) {
|
|
lauched = true;
|
|
NSApplication.shared.activate(ignoringOtherApps: true);
|
|
}
|
|
}
|