Repository navigation
Closed
Description
What happens
On a MacBook's built-in display (with a notch), a theme with a large popup shadow makes popups open far below the bar. With popupDefaults.shadowRadius: 24, bar.height: 52 and bar.margin: 6, the More widgets tray (⋯) opens 36 pt below the bar instead of 6 pt. Widget popups are placed the same way and drop by the same amount.
On an external display whose menu bar hides, the same configuration opens the tray 6 pt below the bar.
Steps to reproduce
- On a Mac with a notch, keep the bar at the top and use a theme or configuration with:
{ "bar": { "height": 52, "margin": 6 }, "popupDefaults": { "shadowColor": "#00000080", "shadowRadius": 24 } } - Put more widgets on the right than fit, so the More widgets button (⋯) shows.
- Click ⋯ on the built-in display.
Expected
The tray opens 6 pt below the bar, as it does on a display without the notch strip.
Environment
- StableBar 0.15.0
- macOS 27.2
- MacBook built-in Retina display, 1512 × 982 pt:
frame.maxY1440,visibleFrame.maxY1408 (a 32 pt strip at the top) - External Dell U2722D, 2560 × 1440, with
visibleFrameequal toframe: not affected
Evidence
- The visible bar ends 46 pt from the top of the screen (52 − 6). The tray's window starts 50 pt above its visible edge for the shadow (
shadowRadius × 2 + 2), so StableBar places the window's top 2 pt from the top of the screen (46 + 6 − 50). - A standalone borderless
NSPanelat.floating, given that frame on the built-in display, sits 32 pt from the top once ordered front. That moves it 30 pt down, which leaves the tray 36 pt below the bar. A subclass that returnsframeRectfromconstrainFrameRect(_:to:)stays where it was put. On the Dell, neither moves. - The tray in a screenshot of the running bar sits 82 pt from the top of the screen, which matches 32 + 50.
Diagnosis
On main (000007e):
WidgetPopup.openTooltip(Sources/StableBar/WidgetPopup.swift:466-484) pads the popup byshadowInset = shadowRadius * 2 + 2and places the window atedge - size.height - 6 + shadowInset.WidgetPopup.open(:574) does the same for widget popups. With a large shadow, the window's transparent top margin reaches into the menu bar strip, while the visible popup stays below the bar.- AppKit's
constrainFrameRect(_:to:)moves a window whose top is abovescreen.visibleFrame.maxYdown to it when the window is shown.PopupPanel(WidgetPopup.swift:5) and the popup's shadow window (a plainNSPanelfrommakeShadowWindow,:967) don't override it. The windows that live in that strip do:BarPanel(StableBarApp.swift:211),PassiveBarPanel,BarEditControlsandBarEditAddPopover. - The constraint applies only on a display whose
visibleFramestops below its top, such as a built-in display with a notch. It doesn't apply when the menu bar hides there andvisibleFrameequalsframe. Themes with the defaultshadowRadius(2) leave the window's top below the strip, so they're unaffected.
Related
- Popups with a shadow get a dark outline floating outside their edge #180 added the separate shadow window behind popups. That's a different problem (an outline around the popup), but the shadow window needs the same fix.
- A bar below the macOS menu bar sits partly under it, with one offset for every display #451 and fix: keep a bar below the menu bar clear of it on every display #468 are about where the bar itself goes below the menu bar, not about popups.
Triaged by Claude Code (Claude Opus 5.5).
Activity
chore(release): 0.16.0 [skip ci]
stablebar-releases commentedon Nov 16, 2026
🎉 This issue has been resolved in version 0.16.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀