mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-14 03:36:59 +08:00
25 lines
735 B
Swift
25 lines
735 B
Swift
import Cocoa
|
|
import FlutterMacOS
|
|
|
|
@NSApplicationMain
|
|
class AppDelegate: FlutterAppDelegate {
|
|
var launched = false;
|
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
|
dummy_method_to_enforce_bundling()
|
|
// https://github.com/leanflutter/window_manager/issues/214
|
|
return false
|
|
}
|
|
|
|
override func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool {
|
|
if (launched) {
|
|
handle_applicationShouldOpenUntitledFile();
|
|
}
|
|
return true
|
|
}
|
|
|
|
override func applicationDidFinishLaunching(_ aNotification: Notification) {
|
|
launched = true;
|
|
NSApplication.shared.activate(ignoringOtherApps: true);
|
|
}
|
|
}
|