3 ms·
Depends on what "practical" means to you. For example, you can paste import AppKit _ = NSApplication.shared NSApp.setActivationPolicy(.regular) let
by saagarjha 6y ago
Depends on what "practical" means to you. For example, you can paste
import AppKit
_ = NSApplication.shared
NSApp.setActivationPolicy(.regular)
let window = NSWindow(contentRect: NSRect(origin: .zero, size: CGSize(width: 500, height: 500)), styleMask: [.titled, .closable, .miniaturizable, .resizable], backing: .buffered, defer: true)
window.title = "Test"
window.center()
window.makeKeyAndOrderFront(nil)
NSApp.activate(ignoringOtherApps: true)
NSApp.run()
into a file and run it to get a window.