[Bug] macOS Traffic Light Window Buttons Top-Clipped at 100%+ Zoom on High-DPI Displays
Open 💬 0 comments Opened Jul 22, 2026 by Michael-IT001
Bug Description
On Intel macOS with a 5K Retina display (5120 x 2880), the native window control buttons (red/yellow/green traffic lights) in the desktop app get truncated at the top when the app zoom is at 100% or above (110%, 120%, etc.).
Root Cause Analysis
In the main process window positioning logic, setWindowButtonPosition dynamically recalculates the Y position of the native traffic lights using a linear formula based on content zoom:
trafficLightPosition: { x: 16, y: Math.round((46 * zoom - 14) / 2) }
At 100%+ zoom levels on Retina scaling, this calculation pushes the native Y coordinate too high relative to the top window inset boundary, causing the top of the circles to be clipped.
Suggested Fix
Decouple native macOS window control positions from web content zoom scale by setting a constant Y offset regardless of the zoom scale factor:
trafficLightPosition: { x: 16, y: 14 }
Environment
- OS: macOS 13
- Display: 5K Retina (5120 x 2880)
- App: Codex Desktop App for macOS