Initial commit
This commit is contained in:
commit
d5c932d8e1
710 changed files with 50282 additions and 0 deletions
14
.tmp_axprobe/zywin.swift
Normal file
14
.tmp_axprobe/zywin.swift
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import Cocoa
|
||||
let opts: CGWindowListOption = [.optionOnScreenOnly, .excludeDesktopElements]
|
||||
if let list = CGWindowListCopyWindowInfo(opts, kCGNullWindowID) as? [[String: Any]] {
|
||||
for w in list {
|
||||
let pid = w[kCGWindowOwnerPID as String] as? Int ?? -1
|
||||
let owner = w[kCGWindowOwnerName as String] as? String ?? "?"
|
||||
let name = w[kCGWindowName as String] as? String ?? ""
|
||||
let b = w[kCGWindowBounds as String] as? [String: CGFloat] ?? [:]
|
||||
let layer = w[kCGWindowLayer as String] as? Int ?? -1
|
||||
if layer == 0 {
|
||||
print("pid=\(pid) owner=\(owner) name='\(name)' bounds=\(b)")
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue