mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-15 03:59:04 +08:00
d5c0bcea61
Signed-off-by: Kingtous <kingtous@qq.com>
25 lines
782 B
Swift
25 lines
782 B
Swift
import Cocoa
|
|
import FlutterMacOS
|
|
// import bitsdojo_window_macos
|
|
|
|
class MainFlutterWindow: NSWindow {
|
|
override func awakeFromNib() {
|
|
if (!rustdesk_core_main()){
|
|
print("Rustdesk core returns false, exiting without launching Flutter app")
|
|
NSApplication.shared.terminate(self)
|
|
}
|
|
let flutterViewController = FlutterViewController.init()
|
|
let windowFrame = self.frame
|
|
self.contentViewController = flutterViewController
|
|
self.setFrame(windowFrame, display: true)
|
|
|
|
RegisterGeneratedPlugins(registry: flutterViewController)
|
|
|
|
super.awakeFromNib()
|
|
}
|
|
|
|
// override func bitsdojo_window_configure() -> UInt {
|
|
// return BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP
|
|
// }
|
|
}
|