Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
Adam777Z opened this issue Aug 6, 2022 · 14 comments
Open
3 tasks done

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

Adam777Z opened this issue Aug 6, 2022 · 14 comments

Comments

@Adam777Z
Copy link

Adam777Z commented Aug 6, 2022

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2022

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!

@github-actions github-actions bot added the stale label Nov 7, 2022
@Adam777Z
Copy link
Author

Adam777Z commented Nov 7, 2022

This issue still happens in Electron v21.1.1.

@github-actions github-actions bot removed the stale label Nov 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

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!

@github-actions github-actions bot added the stale label Feb 7, 2023
@Adam777Z
Copy link
Author

Adam777Z commented Feb 7, 2023

This issue still happens in Electron v23.0.0.

@github-actions github-actions bot removed the stale label Feb 8, 2023
@github-actions
Copy link
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!

@github-actions github-actions bot added the stale label May 10, 2023
@Adam777Z
Copy link
Author

This issue still happens in Electron v24.2.0.

@github-actions github-actions bot removed the stale label May 11, 2023
@github-actions
Copy link
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!

@github-actions github-actions bot added the stale label Aug 10, 2023
@Adam777Z
Copy link
Author

This issue still happens in Electron v25.5.0.

@github-actions github-actions bot removed the stale label Aug 11, 2023
@electron-issue-triage
Copy link

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!

@Adam777Z
Copy link
Author

Adam777Z commented Nov 9, 2023

This issue still happens in Electron v27.0.4.

@electron-issue-triage
Copy link

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!

@Adam777Z
Copy link
Author

Adam777Z commented Feb 9, 2024

This issue still happens in Electron v28.2.2.

@electron-issue-triage
Copy link

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!

@Adam777Z
Copy link
Author

This issue still happens in Electron v30.0.3.

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

No branches or pull requests

2 participants