macos: moving some files around

This commit is contained in:
Mitchell Hashimoto
2025-06-04 19:44:30 -07:00
parent f8e3539b7d
commit 1966dfdef7
14 changed files with 13 additions and 21 deletions

View File

@@ -0,0 +1,12 @@
import AppKit
extension NSWindow {
/// Get the CGWindowID type for the window (used for low level CoreGraphics APIs).
var cgWindowId: CGWindowID? {
// "If the window doesnt have a window device, the value of this
// property is equal to or less than 0." - Docs. In practice I've
// found this is true if a window is not visible.
guard windowNumber > 0 else { return nil }
return CGWindowID(windowNumber)
}
}