Issue #806

Use runModal

https://developer.apple.com/documentation/appkit/nsapplication/1428590-runmodalsession

Blocks main queue

A loop that uses this method is similar in some ways to a modal event loop run with runModal(for:), except with this method your code can do some additional work between method invocations. When you invoke this method, events for the NSWindow object of this session are dispatched as normal. This method returns when there are no more events. You must invoke this method frequently enough in your loop that the window remains responsive to events. However, you should not invoke this method in a tight loop because it returns immediately if there are no events, and consequently you could end up polling for events rather than blocking.

Use beginModalSession

https://developer.apple.com/documentation/appkit/nsapplication/1428418-beginmodalsession

In a modal session, the app receives mouse events only if they occur in aWindow. The window is made key, and if not already visible is placed onscreen using the NSWindow method center().

Need to call runModalSession and end with endModalSession

Use just NSWindow

Make key and order front regardless

let window = NSWindow(contentViewController: NSHostingController(rootView: view))
window.level = .floating
window.makeKeyAndOrderFront(nil)
window.orderFrontRegardless()