hello everyone, I'm making an application and I need to overlay an NSWindow with debug information on top of applications opened in full screen mode. How can i do this? Here is my code -
let contentRect = NSScreen.main!.frame
let overlayWindow = NSWindow(contentRect: contentRect,
styleMask: [.borderless, .fullSizeContentView],
backing: .buffered,
defer: false
)
overlayWindow.level = .screenSaver
overlayWindow.collectionBehavior = [.canJoinAllSpaces, .fullScreenAuxiliary, .stationary]
let size = contentRect.width/3
overlayWindow.setFrame(
CGRect(
x: contentRect.midX - size/2,
y: contentRect.midY - size/2,
width: size,
height: size
),
display: true
)
overlayWindow.makeKeyAndOrderFront(nil)

i tried to add .stationary to collectionBehavior
