FB13212424: My app's main window is behind current front-most window once .activate() method is called
iSapozhnik opened this issue · comments
Sapozhnik Ivan commented
- Date: 2023-09-28
- Resolution: Open
- Area: AppKit
- OS: macOS 14
- Type: Incorrect/Unexpected Behavior
- Keywords: yield, cooperative, activation
Description
I have made a bare minimum app to showcase the issue. This is a menu bar app with NSMenu attached to the menu bar. Once the menu bar item is clicked - there is a menu with a "Show window" option. Clicking this option should show a simple NSWindow instance on top of everything that is on the screen. Instead, the window appears behind the frontmost window. In order to activate the app I'm using the new API .activate(). However when I use the old API which is deprecated in macOS 14 - it works. Please check the attached Xcode project.