Repository navigation
fix: keep clicks on the bar from showing the menu bar on macOS 27 - #369
Merged
Merged
Conversation
On a display with a notch, macOS 27 covers the hidden menu bar's area with an invisible strip above the bar, and a click on it shows the menu bar instead of reaching the bar. Keep the bar above the strip while the menu bar is hidden, and under the menu bar while macOS shows it. Closes #366
This was referenced Oct 29, 2026
|
🎉 This PR is included in version 0.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS 27, with the menu bar hiding automatically, clicks on the bar on a display with a notch show the macOS menu bar, and the click never reaches the widget. Fixes #366.
macOS 27's new MenuBarAgent covers the hidden menu bar's area on such a display with an invisible strip at window level 25. The bar sits at level 3, under it. MenuBarAgent takes the click and reveals the menu bar; its log says
shownBy: "stripTap". Displays without a notch have no strip.Changes
MenuBarStrip(Sources/StableBar/MenuBarStrip.swift) raises a display's bar to level 26 while MenuBarAgent's strip covers that display's top and the menu bar is hidden. While macOS shows the menu bar, the bar goes back to.floating, so a menu bar revealed from the top edge, the keyboard or a client still draws over it.MenuBarStripStatereads that from the window list: a full-width MenuBarAgent window at the status level or above, at the display's top, means a strip. Any visible window at the main menu level there means the menu bar shows. These are owners, levels and bounds only; no Screen Recording needed.BarPanelkeeps its decoration window at the bar's level. The strip update runs before the edit controls, which copy the bar's level.Displays without a strip, and macOS before 27, keep the bar at
.floating.Testing
swift test --filter "menuBarStrip|menuBarDelay|BarDecoration|BarEditControls|PopupClick": all pass. Four new tests cover the strip on one display only, a menu bar shown or sliding versus hidden, other status-level windows, and the 5-point band.onClick. MenuBarAgent logged nostripTapreveal.mouseEdge). The bar dropped to level 3 within one or two samples (about 15–30 ms) of the menu bar starting to slide in, and the menu bar showed over it.stripTap); at level 26 both clicks arrived with no reveal.Merging
One fix commit. Squash merge with the title is fine. #368 fixes the reveal delay, the other macOS 27 regression from the same investigation, and doesn't depend on this one.
Claude Opus 5.5 via Claude Code.