mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
applicationDidFinishLaunching
This commit is contained in:
@@ -3,13 +3,21 @@ import FlutterMacOS
|
|||||||
|
|
||||||
@NSApplicationMain
|
@NSApplicationMain
|
||||||
class AppDelegate: FlutterAppDelegate {
|
class AppDelegate: FlutterAppDelegate {
|
||||||
|
var lauched = false;
|
||||||
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
dummy_method_to_enforce_bundling()
|
dummy_method_to_enforce_bundling()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool {
|
override func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool {
|
||||||
|
if (lauched) {
|
||||||
handle_applicationShouldOpenUntitledFile();
|
handle_applicationShouldOpenUntitledFile();
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||||
|
lauched = true;
|
||||||
|
NSApplication.shared.activate(ignoringOtherApps: true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user