Skip to content

fix: put the bar back above the menu bar strip after the screen locks - #375

Merged
M4n0x merged 1 commit into
mainfrom
fix/374-strip-after-lock
Oct 29, 2026
Merged

M4n0x merged 1 commit into
mainfrom
fix/374-strip-after-lock

Conversation

@M4n0x

@M4n0x M4n0x commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Problem

On macOS 27, with the menu bar hiding automatically, the bar on a display with a notch can stay below MenuBarAgent's invisible strip after the screen locks and unlocks. Clicks on it then show the macOS menu bar again, as before #366. Fixes #374.

MenuBarStrip (from #369) set no timer once a check found no strip. During the lock screen's animation, MenuBarAgent's level-25 window shrinks away from the display's top for about 0.3 s. A check in that window lowered the bar and stopped the timer. The strip then came back over the bar, which got no mouse-entered events, so nothing checked again. Sleep stops the timer too, so the first check after a wake could do the same.

Changes

  • MenuBarStripState.checkInterval decides how often to read the window list. It is the old rule plus one case: every two seconds while a bar sits on a display with a notch, even when no strip shows. A read costs about 1 ms.
  • MenuBarStrip notes which of its bars are on a display with a notch (auxiliaryTopLeftArea) each time the bars update.
  • Displays without a notch still get no timer.

Testing

  • swift test --filter "menuBarStrip|menuBarDelay|BarDecoration|BarEditControls|PopupClick": 14 tests pass. The new menuBarStripKeepsCheckingABarOnANotchedDisplayBeforeTheStripShows failed before the change: no interval for a notched display without a strip.
  • Live on macOS 27.2: MacBook Pro built-in display and a Dell external, auto-hide on. A probe logged MenuBarAgent's windows, each bar window's level and the lock events every 100 ms. A scratch bar from this branch ran next to the installed beta (.480), and the screen was locked and unlocked five times.
    • Both bars dropped to level 3 during some lock animations, when no strip showed.
    • The branch's bar was back at level 26 within 0.4–0.9 s of the strip returning after each unlock (09:28:19.0, 09:28:25.0).
    • The beta's bar stayed at level 3 across two lock cycles (09:28:13 to 09:28:28). Earlier that morning it stayed there for almost three minutes, which is how the bug was noticed.
  • Not checked: a long run with the external display unplugged. The cause is the same and doesn't depend on the external display.
  • No visible change beyond the bar's window level, so no screenshots.

Merging

One fix commit; a squash with the title is fine.

Claude Opus 5.5 via Claude Code.

On macOS 27, a check that ran while MenuBarAgent's strip was away, such as
during the lock screen's animation, lowered the bar and stopped the timer.
The strip came back over the bar, which then got no mouse events, so
clicks showed the menu bar until something else made the bar check again.

The two-second check now keeps running while a bar sits on a display with
a notch, so the bar is back above the strip within two seconds.

Fixes #374
@M4n0x
M4n0x requested a review from Seb-GRAF as a code owner October 29, 2026 08:34
@M4n0x
M4n0x merged commit 71fe38f into main Oct 29, 2026
8 checks passed
@M4n0x
M4n0x deleted the fix/374-strip-after-lock branch October 29, 2026 08:47
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After the screen locks, clicks on the bar on a notched display show the menu bar again on macOS 27

1 participant