How can I trick an NSWindow as displaying as active, without activating the application itself?
(The reason is that I wish to somehow trick Cocoa into doing that temporarily while I take a “screenshot” of the window.
It’s very difficult to do this through all the methods I’ve experimented with, because things always happen not instantly but “soon”. For example, I can’t just activate the app, take the screenshot, and re-activate the previously active app, because “activate app” is an operation that just happens “sometime in the future”, i.e. the app doesn’t wait for the operation to finish before continuing. So it’s all very tricky.)
I doubt there is any good way to do this properly