import AppKit import CoreGraphics /// Represents a single on-screen window with its metadata and thumbnail. struct WindowInfo: Identifiable, Equatable { let windowID: CGWindowID let title: String let appName: String let appBundleID: String let appIcon: NSImage? let frame: CGRect let pid: pid_t let isOnScreen: Bool var thumbnail: CGImage? var id: CGWindowID { windowID } /// Fingerprint component for layout stability. var fingerprintKey: String { "\(appBundleID)|\(title)" } static func == (lhs: WindowInfo, rhs: WindowInfo) -> Bool { lhs.windowID == rhs.windowID && lhs.thumbnail === rhs.thumbnail } }