Skip to content

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

Closed

Description

@M4n0x

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

  1. macOS 27.2 on a MacBook Pro with a notch, menu-bar auto-hide on, bar on the top edge.
  2. Lock the screen (⌃⌘Q) and unlock it. Repeat a few times.
  3. 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

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×38 and (-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

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    bug
    on Oct 29, 2026
  2. stablebar-releases commented on Oct 29, 2026

    @stablebar-releases

    🎉 This issue has been resolved 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions