fix: call win.show() on activate to prevent traffic light position flash#1863
Open
rubywwwilde wants to merge 1 commit intoelectron:mainfrom
Open
fix: call win.show() on activate to prevent traffic light position flash#1863rubywwwilde wants to merge 1 commit intoelectron:mainfrom
rubywwwilde wants to merge 1 commit intoelectron:mainfrom
Conversation
On macOS, when a window using `titleBarStyle: 'hiddenInset'` with custom `trafficLightPosition` is minimized and restored via dock click, the native traffic light buttons briefly appear at (0,0) before jumping to the configured position. Calling `win.show()` in the activate handler forces a proper state transition that avoids this flash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1862
On macOS, when a window using
titleBarStyle: 'hiddenInset'with a customtrafficLightPositionis minimized and restored via dock click, the native traffic light buttons briefly flash at position (0,0) before jumping to the configured position ~1 second later.This happens because macOS renders the traffic lights at their default position during deminiaturization before Electron reapplies the custom position. Calling
win.show()in theactivatehandler forces a state transition that avoids the flash.Changes
win.show()call in theapp.on('activate')handler after retrieving the existing windowTest plan
🤖 Generated with Claude Code