NSApplicationActivateAllWindows does not work, any alternative?

According to the documentation of the NSApplicationActivateAllWindows flag of -[NSRunningApplication activateWithOptions:], "all of the application's windows are brought forward". That does not actually happen, and has not since at least macOS 10.15. It did work in macOS 10.13, don't know about 10.14. Is there any reasonable alternative to achieve the same effect?

  • When you click an app in the Dock, all the windows come forward. Looks like it's using some private equivalent of SetFrontProcessWithOptions.

Add a Comment

Replies

It turns out that the Carbon function SetFrontProcessWithOptions, deprecated since 10.9, does bring all the windows forward. The documentation says "Passing 0 for the options is equivalent to calling SetFrontProcess", but that's not true, SetFrontProcess does not bring all the windows forward.