fix(electron): prevent initial flicker on minimize/maximize and Alt+Tab in Windows 11 #1445
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.
✨ Pull Request
📓 Referenced Issue
Fixes: #1362
ℹ️ About the PR
This PR resolves a flickering issue on Windows 11 that occurs when minimizing and maximizing the application or when using Alt+Tab switching.
The issue only happens on the first attempt to switch; subsequent attempts work correctly. However, after switching to another app, the problem reappears.
🛠️ What was done
Implemented a fix to ensure the window transitions (minimize, maximize, and Alt+Tab switch) occur without flickering during the first interaction cycle.
Verified that all tests run successfully with no errors.
💬 Notes
This problem was originally fixed by @Hetsavani in issue Alt + Tab Switching Issue: App Flickers and Disappears on Windows 11 #1362, but the issue is still open and outdated, so this PR provides an updated implementation.
This is my first contribution to any open-source project, so feel free to point out anything I can improve. I'm open to all feedback.
🖼️ Testing Scenarios / Screenshots