Skip to content

The bar sits under a black band on full-screen Spaces of a display with a notch #965

Done

Description

@M4n0x

What happens

With bar.showOnFullScreen on, an app in native full screen on a MacBook's built-in display shows a black band across the top of the screen, beside the notch, and the bar sits under it. Only the bar's bottom few points show, below the band, over the app's top edge. The guide says a bar on the top edge no taller than the notch fits in that band.

The top 70 pt of the built-in display, a blank blue app in full screen, the bar 52 pt tall with a 6 pt margin:

The black band covers the bar; only its bottom edge shows above the blue app

Steps to reproduce

  1. macOS 27.2, a MacBook display with a notch, the macOS menu bar set to hide automatically, the bar on the top edge.
  2. Turn on Show on full-screen apps in Settings → Appearance → Bar, or set bar.showOnFullScreen to true.
  3. Put any app in native full screen on the built-in display (green button or ⌃⌘F).

Expected

The bar draws over the black band, as it does over the menu bar's area on the desktop, and goes under the menu bar while macOS shows it (pointing at the top edge).

Environment

Evidence

The window list at the top of the built-in display (CGWindowListCopyWindowInfo, on-screen windows), with a test app in native full screen:

Window Desktop, menu bar hidden Full-screen Space, menu bar hidden
Window Server Menubar, layer 24 off screen, at 0,−39 on screen at 0,0 1800×39: the black band
MenuBarAgent strip, layer 25 0,0 1800×39 0,0 1800×39
StableBar bar layer 26 layer 3

Moving the pointer to the top edge and away, and reading the window list every 5 ms on the desktop:

  • MenuBarAgent removes its strip whenever the menu bar shows, on the desktop and on a full-screen Space, and puts a new one back as it hides.
  • On the desktop, the strip comes back about 7 ms before the Menubar window starts sliding up from y = 0; the slide takes about 150 ms.

Diagnosis

MenuBarStrip (Sources/StableBar/MenuBar/MenuBarStrip.swift) raises the bar to .aboveMenuBarStrip (26) only when MenuBarStripState.raisesBar(on:) holds: a strip, and no shown menu bar. MenuBarStripState counts any bar-sized window at the main menu level that reaches below the display's top edge as a shown menu bar:

if layer == menuBarLevel, barSized, bounds.maxY > display.minY + 1 { shownMenuBars.insert(id) }

On a full-screen Space of a display with a notch, the hidden menu bar's window stays at y = 0 as the black band, so the bar goes down to .floating (3), under it. Since a menu bar showing over a strip keeps checkInterval at 1/30 s, StableBar also reads the window list 30 times a second for as long as that Space is in front.

The same reading, a strip under a menu bar window resting at the top, also lasts about 7 ms on the desktop as the menu bar starts hiding. One reading can't tell the two apart; the band is the one that lasts.

#964 was checked in a VM, whose display has no notch.

Related

Triaged by Claude Code (Claude Opus 5.5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions