Wraps the call to NSApp.activate(ignoringOtherApps: true) in a false-by-default boolean check. I know that this call is necessary for status bar/LSUIElement apps, but it's terribly poor form to use it elsewhere. Prior to this change, there is also no way to switch panes using the provided API without stealing focus.
Replaces the calls to setFrameUsingName(…) and setFrameAutosaveName(…) in favour of NSWindowController.windowFrameAutosaveName which can be reset to a locally defined frame name after init.
Replaces the custom window placing code with a call to NSWindow.center() before we set the autosaved frame name. This has the effect of making the window appear in the centre of the display by default, but respecting the user's placement thereafter.
The only thing I need to resolve is setting a default location
This PR proposes a couple of changes:
NSApp.activate(ignoringOtherApps: true)
in a false-by-default boolean check. I know that this call is necessary for status bar/LSUIElement apps, but it's terribly poor form to use it elsewhere. Prior to this change, there is also no way to switch panes using the provided API without stealing focus.setFrameUsingName(…)
andsetFrameAutosaveName(…)
in favour ofNSWindowController.windowFrameAutosaveName
which can be reset to a locally defined frame name after init.NSWindow.center()
before we set the autosaved frame name. This has the effect of making the window appear in the centre of the display by default, but respecting the user's placement thereafter.The only thing I need to resolve is setting a default location