Previously we would set the window to “join all spaces” when TextMate was active, but on 10.11 it seems that the system will act like this is set even when TextMate “becomes activate”, so moving focus to TextMate, with an open Find/HTML window, will move the window to the active space, rather than move to the space containing TextMate.
Now we only set “join all spaces” when the user requests one of the windows, and the window is currently not already on the active space, and we unset this mode after bringing the window to front.
This commit effectively reverts a52fc3493b
Some commands clearly should not share output window frame, OTOH it might be tedious having to position every new command used (if the default position is undesired).
We should probably re-use last command’s frame if there isn’t already a frame stored for the command (that’s what TextMate 1.x did). It might also be possible to group commands via its semantic class, so all run commands use the same window frame, though currently semantic classes have unique (language) suffixes.
The latter is updated via a dispatch queue and thus might be delayed (to after end of current event loop cycle). This is relevant when WebView itself terminates the URL loading and calls the “WebView should close” delegate method.
Here the HTML output view property has been updated (via the WebView delegate method) but the command runner has not yet executed the completion code (which updates it’s “is running” state).
The motivation for using a panel was to avoid the window from becoming main (so key equivalents would be sent to the document window, if not handled by the HTML output window). Unfortunately window ordering ignores non-main windows when a window is closed meaning that bringing up the Find dialog from an HTML output window and then closing it, would bring the current main window to front, eclipsing the HTML output window.
There are places where we iterate through the delegates of NSApp’s ordered windows. Since the window may stay around longer than it’s (NSWindowController) delegate, we should be sure to set NSWindow’s delegate property to nil.
We now explicitly disable it for targets that hasn’t yet been upgraded to ARC. This way, it’s easier to get an overview of which targets hasn’t yet been upgraded and ensures new targets has ARC enabled.