Skip to content

[Bug]: Maximize window visual glitch on Windows #35246

Closed

Description

@Adam777Z

Preflight Checklist

Electron Version

20.0.1

What operating system are you using?

Windows

Operating System Version

Windows 11

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

No visual glitch, the whole window showing the background color (default or set using backgroundColor) until the content is loaded.

Actual Behavior

On Windows using the maximize method of BrowserWindow after opening the app's window causes a visual glitch until it loads the content.
This results in a bad user experience.
Tested on Windows 10 & 11 64-bit.
Also tested on Ubuntu 22.04 64-bit, it's good, no visual glitch.
Tried with default window width and height.

Method:
https://www.electronjs.org/docs/latest/api/browser-window#winmaximize

Code:

const win = new BrowserWindow();
win.maximize();

Workaround:
Don't show the window, maximize it, then show it:

const win = new BrowserWindow({show: false});
win.maximize();
win.show();

Or hide the window, then maximize it, then show it:

const win = new BrowserWindow();
win.hide();
win.maximize();
win.show();

Test:
https://github.com/Adam777Z/electron-windows-visual-glitch-test

Testcase Gist URL

No response

Additional Information

No response

Activity

  1. github-actions commented on Nov 7, 2022

    @github-actions
    Contributor

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  2. Adam777Z commented on Nov 7, 2022

    @Adam777Z
    Author

    This issue still happens in Electron v21.1.1.

  3. github-actions commented on Feb 7, 2023

    @github-actions
    Contributor

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  4. Adam777Z commented on Feb 7, 2023

    @Adam777Z
    Author

    This issue still happens in Electron v23.0.0.

  5. github-actions commented on May 10, 2023

    @github-actions
    Contributor

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  6. Adam777Z commented on May 10, 2023

    @Adam777Z
    Author

    This issue still happens in Electron v24.2.0.

  7. 28 remaining items

  8. electron-issue-triage commented on May 9, 2025

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  9. pushkin- commented on May 12, 2025

    @pushkin-

    repros in v36

  10. electron-issue-triage commented on Aug 11, 2025

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  11. Adam777Z commented on Aug 11, 2025

    @Adam777Z
    Author

    This issue still occurs in Electron v37.2.6.

  12. electron-issue-triage commented on Nov 11, 2025

    @electron-issue-triage

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  13. pushkin- commented on Nov 11, 2025

    @pushkin-

    bump

  14. Adam777Z commented on Nov 12, 2025

    @Adam777Z
    Author

    This was finally fixed in Electron v38.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions