Skip to content

Fix left click on status item for macOS 27 - #133

Merged
winebarrel merged 3 commits into
mainfrom
fix-left-click-macos27
Oct 1, 2026
Merged

winebarrel merged 3 commits into
mainfrom
fix-left-click-macos27

Conversation

@winebarrel

Copy link
Copy Markdown
Owner

Problem

On macOS 27, left-clicking the status item no longer opens the popover.

Since macOS 27, the menu bar is hosted by the system, so mouse events are no longer delivered to MouseHandlerView, which was added as a subview of the status item button.

Changes

  • Remove MouseHandlerView and add StatusItemClickHandler, which handles clicks via the button's target/action (sendAction(on: [.leftMouseUp, .rightMouseUp])).
    • Left click toggles the popover.
    • Right click (or Control-click) shows the menu that SwiftUI attached to the status item (RightClickMenuView).
    • The menu is detached from the status item so the action gets called, and is detached again whenever SwiftUI re-attaches it (KVO).
  • Update Package.resolved (MenuBarExtraAccess 1.3.1, swift-collections 1.7.1).

Testing

  • Verified on macOS 27 that left click opens the popover and right click shows the menu.
  • Not verified on macOS 26 or earlier (deployment target is 14.6).

Same fix as winebarrel/Pullse#128.

winebarrel and others added 2 commits October 1, 2026 11:08
Since macOS 27, the menu bar is hosted by the system and mouse events
are no longer delivered to views added to the status item button.
Handle clicks via the button's target/action instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@winebarrel
winebarrel enabled auto-merge October 1, 2026 02:08
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@winebarrel
winebarrel disabled auto-merge October 1, 2026 02:12
@winebarrel
winebarrel enabled auto-merge October 1, 2026 02:12
@winebarrel
winebarrel merged commit 1eb8f11 into main Oct 1, 2026
3 checks passed
@winebarrel
winebarrel deleted the fix-left-click-macos27 branch October 1, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant