-
Notifications
You must be signed in to change notification settings - Fork 750
Description
Electron Fiddle uses titleBarStyle: 'hiddenInset' with a custom traffic light position on macOS. When the window is minimized and restored (via dock click), the traffic light buttons briefly appear at position (0, 0) — the top-left corner of the window frame — then jump to the configured position after approximately 1 second.
Steps to reproduce:
- Launch Electron Fiddle on macOS
- Minimize the window (Cmd+M or yellow button)
- Click the dock icon to restore
Expected: Traffic lights appear at their configured position immediately.
Actual: Traffic lights flash at (0, 0) then jump to the correct position.
Environment: macOS 26.2 (Tahoe)
Fix: Call win.show() on the existing window in the app.on('activate') handler. This forces a state transition that avoids the native macOS redraw timing issue.
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
} else if (win) {
win.show();
}
});This is the same underlying Electron bug reported at https://github.com/electron/electron/issues/XXXXX (replace with your electron issue number once filed).
Note: The flash is most prominent on the first minimize/restore cycle after launching the app. Subsequent minimize/restore cycles either do not reproduce the bug or the flash is too brief to be perceptible.
This issue was drafted with AI assistance and may contain minor inaccuracies in technical details. The described behavior and workaround have been personally verified and reproduced.