rustdesk/flutter/macos/Runner/MainFlutterWindow.swift
Kingtous d5c0bcea61 revert: remove conflict bitsdojo_window plugin for linux & macOS
Signed-off-by: Kingtous <kingtous@qq.com>
2022-06-27 10:00:51 +08:00

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
// }
}