Various menu bar NSStatusItem issues with macOS 27

It seems like macOS 27 beta 2 has some issues with NSStatusItem buttons added to the menu bar - this creates difficulties for some menu bar extra apps.

  1. NSStatusItem buttons does not receive mouse hover/movement events - FB23329983

On macOS 27, views inside an NSStatusItem button no longer receive hover or mouse-movement events. The same code works correctly on macOS 26. What I tried:

  • An NSTrackingArea attached to a subview of NSStatusBarButton
  • An NSTrackingArea attached directly to the status-bar button
  • Replacing NSStatusItem.view with a custom view
  • Embedding an NSHostingView and using SwiftUI onHover/onContinuousHover
  1. NSStatusItem button highlight cannot be set programmatically. - FB23330269

The following code no longer has any effect (does not provide the highlight capsule):

NSStatusItem.button?.highlight(true)

  1. NSStatusItem window occlusionState no longer reflects hidden menu bar visibility - FB23349447

The following no longer works:

statusItem.button?.window?.occlusionState.contains(.visible)

These changes may be related to some of the touch related changes or maybe it's about how menu items are now seemingly more "managed" in a way that their position, visibility may change in a way that is transparent/undetectable to the app.

Various menu bar NSStatusItem issues with macOS 27
 
 
Q