Repository navigation
Description
What happens
On macOS 27 with Automatically hide the menu bar on, the fix for #366 keeps the bar above MenuBarAgent's invisible strip on a display with a notch. After the screen locks and unlocks, the bar on that display can stay below the strip again. Clicks on it then slide in the macOS menu bar instead of reaching the widget, as before #366. It stays that way until something else makes the bar check again, such as a display or configuration change, which can take minutes.
It doesn't happen on every unlock: it depends on when the bar's periodic check runs. It also followed a sleep, a wake and unplugging an external display.
Steps to reproduce
- macOS 27.2 on a MacBook Pro with a notch, menu-bar auto-hide on, bar on the top edge.
- Lock the screen (⌃⌘Q) and unlock it. Repeat a few times.
- Click the bar on the built-in display.
Expected
The bar goes back above the strip after each unlock, and clicks reach the widgets.
Environment
- StableBar 0.9.0-beta.20261028154523.480 (contains PR fix: keep clicks on the bar from showing the menu bar on macOS 27 #369)
- macOS 27.2 (26B123)
- MacBook Pro built-in display (1800×1169 pt, notch), with and without a Dell external display
- Menu-bar auto-hide on,
bar.menuBarRevealDelay500
Evidence
A probe logged every 100 ms MenuBarAgent's windows at the status level and above, each StableBar bar window's level, and the lock events:
- While the lock screen comes and goes, MenuBarAgent's level-25 window animates. It shrinks and moves away from the display's top edge, for example to
(-1755, 29) 1710×38and(-1710, 58) 1620×36, for about 0.3 s. It then returns to the full strip,(-1800, 0) 1800×39. - The installed bar dropped from level 26 to level 3 in the middle of that animation (09:11:11.7 and 09:28:13.4). The strip was back at full size 0.3 s later, and the bar stayed at level 3. It stayed there for almost three minutes the first time and 15 s in a later test, until something else made the bar check again.
- With the fix below, a second bar on the same display dropped during the lock animation too. After each unlock it was back at level 26 within 0.4–0.9 s of the strip returning (09:28:19.0 and 09:28:25.0), while the unfixed bar stayed at level 3.
Diagnosis
MenuBarStrip in Sources/StableBar/MenuBarStrip.swift reads the window list after the bars update, when the pointer enters a bar, and on a timer. schedule() sets no timer once strips is empty. A check during the lock animation finds no strip, lowers the bar and stops the timer. When the strip comes back, the bar is below it and gets no mouse-entered events, so nothing checks again. Sleep calls stop(), so a first check after waking can do the same while the strip is still away.
Proposal
Keep the two-second check while a bar sits on a display with a notch, even when no strip is showing, so a bar left below the strip goes back above it within two seconds. A window-list read costs about 1 ms. Displays without a notch keep no timer.
Related
- Clicks on the bar show the macOS menu bar on notched displays in macOS 27 #366 / PR fix: keep clicks on the bar from showing the menu bar on macOS 27 #369: the original clicks fix, where this check comes from.
- The menu bar reveal delay no longer holds the menu bar back on macOS 27 #367 / PR fix: keep the menu bar reveal delay working on macOS 27 #368: the reveal delay's macOS 27 fix, unaffected.
- Pause scripts and providers while the displays sleep or the screen is locked #219 is about pausing scripts while the screen is locked, not the bar's level.
Triaged by Claude Code (Claude Opus 5.5).
Activity
chore(release): 0.9.0 [skip ci]
stablebar-releases commentedon Oct 29, 2026
🎉 This issue has been resolved in version 0.9.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀