mirror of
https://github.com/samsonjs/Peekaboo.git
synced 2026-04-02 10:45:50 +00:00
- Remove DispatchSemaphore usage that violated Swift concurrency rules - Implement RunLoop-based async-to-sync bridging in runAsyncCapture() - Convert all capture methods to async/await patterns - Replace Thread.sleep with Task.sleep in async contexts - Keep ParsableCommand for compatibility, avoid AsyncParsableCommand issues - Add comprehensive tests and documentation - Improve error handling and browser helper filtering 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
883 B
Swift
32 lines
883 B
Swift
import AppKit
|
|
import SwiftUI
|
|
|
|
@main
|
|
struct TestHostApp: App {
|
|
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
ContentView()
|
|
.frame(minWidth: 600, minHeight: 500)
|
|
.frame(width: 800, height: 600)
|
|
}
|
|
.windowResizability(.contentSize)
|
|
.windowStyle(.titleBar)
|
|
.defaultSize(width: 800, height: 600)
|
|
}
|
|
}
|
|
|
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
|
func applicationDidFinishLaunching(_ notification: Notification) {
|
|
// Make sure the app appears in foreground
|
|
NSApp.activate(ignoringOtherApps: true)
|
|
|
|
// Set activation policy to regular app
|
|
NSApp.setActivationPolicy(.regular)
|
|
}
|
|
|
|
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
|
true
|
|
}
|
|
}
|