mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
fix(computer-use): settle macOS permission checks
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
public struct ScreenCaptureProbeWindow: Equatable {
|
||||
public let layer: Int
|
||||
public let ownerPid: Int32
|
||||
public let windowId: UInt32
|
||||
|
||||
public init(layer: Int, ownerPid: Int32, windowId: UInt32) {
|
||||
self.layer = layer
|
||||
self.ownerPid = ownerPid
|
||||
self.windowId = windowId
|
||||
}
|
||||
}
|
||||
|
||||
public enum ScreenCaptureProbeWindowSelection {
|
||||
public static func firstCrossProcessNormalWindow(
|
||||
ownPid: Int32,
|
||||
windows: [ScreenCaptureProbeWindow]
|
||||
) -> UInt32? {
|
||||
windows.first { window in
|
||||
window.layer == 0 && window.ownerPid != ownPid
|
||||
}?.windowId
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user