// // DynamicIslandWindow.swift // DynamicIsland // // Created by Harsh Vardhan Goswami on 06/08/24. // import Cocoa class DynamicIslandWindow: NSPanel { override init( contentRect: NSRect, styleMask: NSWindow.StyleMask, backing: NSWindow.BackingStoreType, defer flag: Bool ) { super.init( contentRect: contentRect, styleMask: styleMask, backing: backing, defer: flag ) isFloatingPanel = true isOpaque = false titleVisibility = .hidden titlebarAppearsTransparent = true backgroundColor = .clear isMovable = false collectionBehavior = [ .fullScreenAuxiliary, .stationary, .canJoinAllSpaces, .ignoresCycle, ] isReleasedWhenClosed = false level = .mainMenu + 3 hasShadow = false ScreenCaptureVisibilityManager.shared.register(self, scope: .entireInterface) } override var canBecomeKey: Bool { true } override var canBecomeMain: Bool { true } }