mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-10 09:39:58 +00:00
Set window position in native selector based on data from extension
This commit is contained in:
@@ -21,24 +21,7 @@ class ViewController : NSViewController {
|
||||
override func viewDidLoad () {
|
||||
super.viewDidLoad()
|
||||
|
||||
if (CommandLine.argc < 2) {
|
||||
fputs("Error: Not enough args\n", stderr)
|
||||
exit(1)
|
||||
}
|
||||
|
||||
guard let data = CommandLine.arguments[1].data(using: .utf8) else {
|
||||
fputs("Error: Failed to convert input to data\n", stderr)
|
||||
exit(1)
|
||||
}
|
||||
|
||||
do {
|
||||
// Decode and store initialization JSON data
|
||||
self.initData = try JSONDecoder().decode(InitData.self, from: data)
|
||||
} catch {
|
||||
fputs("Error: Failed to parse input data\n", stderr)
|
||||
exit(1)
|
||||
}
|
||||
|
||||
self.initData = (NSApplication.shared.delegate as! AppDelegate).initData
|
||||
|
||||
/**
|
||||
* View Hierarchy
|
||||
|
||||
Reference in New Issue
Block a user