Hover the controls — the symbols only appear on hover
Traffic Lights (Window Controls)
/ NSWindow.standardWindowButton(_:) · NSWindow.ButtonType /
also called window controls, title bar buttons, close minimize zoom buttons
Traffic lights are the red close, yellow minimize, and green window controls at the top-left of a macOS window. Their symbols appear when the pointer hovers over the group. The green control normally enters full screen and also exposes system window-arrangement choices; macOS still identifies it through NSWindow.ButtonType.zoomButton.
If you called it…
…you meant a traffic lights (window controls).
Anatomy — every part, named
- 4Dirty-document dot
NSWindow.isDocumentEditedThe dark dot replacing the close button's x marks a document with unsaved changes.
Prompt — paste into your agent
Use the standard Traffic Lights from NSWindow.standardWindowButton(_:), preserving their native spacing, hover symbols, and the green button’s system-provided full-screen and window-arrangement behavior. Obtain the green control as .zoomButton and use NSWindow.toggleFullScreen(_:) only when explicitly invoking full screen; do not substitute custom circles.
Debug prompt — when it misbehaves
Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.
Debug my macOS traffic lights (NSWindow.standardWindowButton). Rule out: buttons missing after changing styleMask or using borderless windows; hover glyphs gone because a custom titlebar accessory intercepts tracking; the green button zooming when you expected full screen (option-click zooms); repositioned buttons drifting after full-screen transitions because the themed frame re-lays them out. The symptom:
In code
The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).
| AppKit | NSWindow.standardWindowButton(_:) | |
| AppKit | NSWindow.ButtonType | closeButton, miniaturizeButton, and zoomButton |
| AppKit | NSWindow.toggleFullScreen(_:) | enters or exits a Space-filling full-screen window |