Skip to content

White flash when opening a new window maximized or fullscreen #132339

Closed

Description

@robbycbennett

Does this issue occur when all extensions are disabled?: Yes

Version: 1.60.0 (user setup)
Commit: e7d7e9a
Date: 2021-09-01T10:41:52.311Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043

Steps to Reproduce:

  1. Set "Window: New Window Dimensions" to "maximized" or "fullscreen"
  2. From an existing instance of vscode, open a new instance

The issue was reported here and closed because Electron 8 apparently fixed the issue. However, I'm still having this issue with Electron 13 on Windows. The issue is not present on Manjaro.

Workaround

Activity

  1. deepak1556 commented on Sep 8, 2021

    @deepak1556
    Collaborator

    /gifPlease

  2. added
    windows
    on Sep 8, 2021
  3. vscode-triage-bot commented on Sep 8, 2021

    @vscode-triage-bot

    Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.

    If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette).

    Happy coding!

  4. added
    info-needed
    on Sep 8, 2021
  5. robbycbennett commented on Sep 8, 2021

    @robbycbennett
    ContributorAuthor

    78008708-56a84600-7383-11ea-8c60-90d608a89e56

  6. deepak1556 commented on Sep 9, 2021

    @deepak1556
    Collaborator

    Are you running via WSL ? Does the issue repro if you launch with code --disable-gpu ?

  7. robbycbennett commented on Sep 9, 2021

    @robbycbennett
    ContributorAuthor

    I don't normally use WSL to launch. That is just a gif I found on a previous issue that was similar, but that issue had a different cause and fix. The white flash looks the exact same to me. It occurs when I launch from the Windows GUI, from CMD, or from WSL.

    I only have a dedicated graphics card and no integrated graphics on my Ryzen CPU, so I wouldn't expect anything different to happen. I have tried code --disable-gpu in CMD and WSL and I still have the white flash.

  8. deepak1556 commented on Sep 9, 2021

    @deepak1556
    Collaborator

    Can you provide a screen capture from your device showing the exact steps of launch ? Also attach the output of code --verbose

  9. robbycbennett commented on Sep 9, 2021

    @robbycbennett
    ContributorAuthor

    Like I said, it happens when launching from the terminal or from the GUI. It looks exactly like the GIF, and the flash of white is the exact same. I could record 7 different gifs, one from the launching in taskbar, one from the start menu, one from a desktop icon, a new window from VSCode, from CMD, Powershell, and WSL. It all results in the same thing.

    The important step is that it first opens maximized or fullscreen on the Windows operating system.

    [main 2021-09-09T03:32:20.601Z] Sending some foreground love to the running instance: 3180
    [main 2021-09-09T03:32:20.606Z] Sending env to running instance...
    [main 2021-09-09T03:32:20.728Z] Sent env to running instance. Terminating...
    [main 2021-09-09T03:32:20.728Z] Lifecycle#kill()

  10. deepak1556 commented on Sep 9, 2021

    @deepak1556
    Collaborator

    I could record 7 different gifs, one from the launching in taskbar, one from the start menu, one from a desktop icon, a new window from VSCode, from CMD, Powershell, and WSL.

    Yes it is fine, please attach a recording of what you are observing.

    As for the code --verbose output, looks like you are already having a running instance. Please close all running instances and run that command.

  11. robbycbennett commented on Sep 9, 2021

    @robbycbennett
    ContributorAuthor

    Here's the log file for opening the first instance, although it's a bit cluttered because of extensions and workspaces. I have already reproduced the error without extensions on a new install of VSCode Insiders, so extensions, themes, and workspaces are irrelevant.
    output.txt

  12. robbycbennett commented on Sep 13, 2021

    @robbycbennett
    ContributorAuthor

    Were you able to reproduce the issue? I couldn't get the screencast website you shared to work. Anyway, this makes no difference.

  13. 77 remaining items

  14. Frulfump commented on Jun 13, 2025

    @Frulfump

    I saw that the milestone was changed to June but I still want to confirm it's still happening with the latest release from ~1 hour ago

    Version: 1.102.0-insider (user setup)
    Commit: 7e4e0f4
    Date: 2025-06-13T05:04:03.051Z
    Electron: 35.5.1
    ElectronBuildId: 11727614
    Chromium: 134.0.6998.205
    Node.js: 22.15.1
    V8: 13.4.114.21-electron.0
    OS: Windows_NT x64 10.0.19045

  15. LinhTrucVo commented on Jun 28, 2025

    @LinhTrucVo

    I updated to the latest version but the issue is still there

    Image

    2025-06-28.11-37-56.mp4
  16. BowkC commented on Jul 1, 2025

    @BowkC

    I am also experiencing this issue
    Brand new laptop Win 11
    Vers 1.101.2

  17. removed this from the June 2025 milestone on Jul 3, 2025
  18. robbycbennett commented on Jul 19, 2025

    @robbycbennett
    ContributorAuthor

    Here's a python script that makes the workaround easier.

    import os
    
    OLD = 'show:e.mode!==0&&e.mode!==3'
    NEW = 'show:true'
    
    PATHS = [
    	f'{os.environ['SystemDrive']}/Program Files/Microsoft VS Code/resources/app/out/main.js',
    	f'{os.environ['LocalAppData']}/Programs/Microsoft VS Code/resources/app/out/main.js',
    ]
    
    for path in PATHS:
    	try:
    		with open(path, 'r') as file:
    			data = file.read()
    	except FileNotFoundError:
    		continue
    
    	data = data.replace(OLD, NEW, 1)
    
    	with open(path, 'w') as file:
    		file.write(data)
    
    	print(f'Fixed {path}')
  19. adityaonx commented on Aug 19, 2025

    @adityaonx

    I found a fix or say workaround for this white flash issue when opening maximized VS Code, had to experiment with various values. I found that VS Code makes a delay on purpose when vscode is maximized or in fullscreen mode. This is to wait until vscode window is fully loaded and then show it. While waiting, it makes default white flash which is an electron default mechanism. White Flash Fix:

    1. Open C:\Users\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js
    2. Search for "show:"
    3. Replace line "show:e.mode!==0&&e.mode!==3" with "show:true,".
    4. Save & Exit.
      This will remove the delay and instantly loads the window which avoids white flash of electron.

    I have already posted the solution previously. Why creating a duplicate comment each time with the same workaround?

  20. robbycbennett commented on Aug 19, 2025

    @robbycbennett
    ContributorAuthor

    No need for python script

    Here's a python script that makes the workaround easier.

    @RobbyCBennett

    The file to edit is plain text. Notepad, VSCode or any text editor will do. No more than a minute or two to edit manually.

    Every time the editor updates, the main.js file changes. My script is just a way to automate the workaround. You're free to do it manually if you prefer.

  21. Frulfump commented on Oct 2, 2025

    @Frulfump

    This is labeled with "upstream-issue-fixed" which is incorrect electron/electron#35362 is still open.

    I added the basic info to that issue but might as well include it here

    Still an issue, repros with Electron 37.5.1 in VS Code Insiders 1.105.0-insider (not able to check stable atm)

    Version: 1.105.0-insider (user setup)
    Commit: 6e60e67
    Date: 2025-10-01T05:02:28.879Z
    Electron: 37.5.1
    ElectronBuildId: 12409799
    Chromium: 138.0.7204.251
    Node.js: 22.19.0
    V8: 13.8.258.32-electron.0
    OS: Windows_NT x64 10.0.19045

  22. adityaonx commented on Dec 7, 2025

    @adityaonx

    This is labeled with "upstream-issue-fixed" which is incorrect electron/electron#35362 is still open.

    I added the basic info to that issue but might as well include it here

    Still an issue, repros with Electron 37.5.1 in VS Code Insiders 1.105.0-insider (not able to check stable atm)

    Version: 1.105.0-insider (user setup) Commit: 6e60e67 Date: 2025-10-01T05:02:28.879Z Electron: 37.5.1 ElectronBuildId: 12409799 Chromium: 138.0.7204.251 Node.js: 22.19.0 V8: 13.8.258.32-electron.0 OS: Windows_NT x64 10.0.19045

    I mentioned that issue still persist after they closed the issue as fixed!
    I'll reopen a PR to submit a fix as earlier wasn't accepted!

  23. adityaonx commented on Dec 9, 2025

    @adityaonx

    #281765
    No Updates to this PR from 2 days ago!

  24. removed
    upstream-issue-fixed
    on Dec 9, 2025
  25. Frulfump commented on Dec 17, 2025

    @Frulfump

    This no longer repros for me but I'm now on Windows 11 (25H2) as opposed to Windows 10 for the previous reported instances from me.

    Version: 1.107.0 (user setup)
    Commit: 618725e67565b290ba4da6fe2d29f8fa1d4e3622
    Date: 2025-12-10T07:43:47.883Z
    Electron: 39.2.3
    ElectronBuildId: 12895514
    Chromium: 142.0.7444.175
    Node.js: 22.21.1
    V8: 14.2.231.21-electron.0
    OS: Windows_NT x64 10.0.26200
    
  26. robbycbennett commented on Dec 19, 2025

    @robbycbennett
    ContributorAuthor

    Yay! It's fixed on Windows 11 for me too and Windows 10 is no longer supported. I have tested both maximized and full screen.

    Version: 1.107.1 (system setup)
    Commit: 994fd12f8d3a5aa16f17d42c041e5809167e845a
    Date: 2025-12-17T14:15:14.850Z
    Electron: 39.2.3
    ElectronBuildId: 12895514
    Chromium: 142.0.7444.175
    Node.js: 22.21.1
    V8: 14.2.231.21-electron.0
    OS: Windows_NT x64 10.0.26200
    
  27. locked and limited conversation to collaborators on Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugelectronupstreamwindowsworkbench-os-integration

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions