Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NSViewComponentPeer: Attempt to avoid reentrant calls to makeKeyWindow
AUv2 plugins on Arm that are hosted out-of-process (e.g. in Logic 10.7) can sometimes crash due to endlessly recursing through becomeKeyWindow. This tends to happen when displaying a secondary window in a plugin, e.g. an AlertWindow, then clicking on a secondary app, then clicking back on the AlertWindow. To avoid this case, we check that the peer isn't already key before calling makeKeyWindow. Unfortunately, we can't use isKeyWindow to avoid the recursion because this may not return true until after becomeKeyWindow has returned.
- Loading branch information