aerospace fork
Something went wrong. Try again.
1.0 kB · 41 lines
Swift
at main
123456789101112131415161718192021222324252627282930313233343536373839404142@testable import AppBundleimport Common
final class TestApp: AbstractApp { let pid: Int32 let rawAppBundleId: String? let name: String? let execPath: String? = nil let bundlePath: String? = nil @MainActor static let shared = TestApp()
private init() { self.pid = 0 self.rawAppBundleId = "bobko.AeroSpace.test-app" self.name = rawAppBundleId }
var _windows: [Window] = [] var windows: [Window] { get { _windows } set { if let focusedWindow { check(newValue.contains(focusedWindow)) } _windows = newValue } }
private var _focusedWindow: Window? = nil var focusedWindow: Window? { get { _focusedWindow } set { if let window = newValue { check(windows.contains(window)) } _focusedWindow = newValue } } @MainActor func getFocusedWindow(_ cm: CancellationMode) -> Window? { _focusedWindow }}