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]: Full Screen Transparent Windows are White on Windows 10 #30798
Comments
Confirmed that I can reproduce this issue on Windows 10 21H1 build 19043.1165 I forked your gist to automatically get the primary display's width/height: https://gist.github.com/817c57f1aaffece3cae795bba640f829 |
Gracias. Didn't take the time to do that - appreciate it. |
This happens only when the BrowserWindow is shown within the first tick after its creation when the size matches the primary display's size. Calling electron/shell/browser/native_window_views.cc Lines 459 to 464 in 49e62f1
electron/shell/browser/native_window_views.cc Lines 1631 to 1638 in 49e62f1
It ends up using the electron/shell/browser/native_window_views.cc Lines 597 to 610 in 49e62f1
Restoring the maximized state causes problems in Chromium code: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc;l=342-351;drc=11aaa9f9150091c805928724c83d8a807cb65faf A temporary workaround is to delay showing the BrowserWindow until either the |
I gave both of those a try with hardware acc disabled, and the window just never rendered. Even if it did render eventually, (and I'm just doing something wrong), I worry that it'd butt up against this bug (#27265). The +1 trick is very dirty but it won't prevent me from deploying my feature, so I'm going to roll with it. |
Preflight Checklist
Electron Version
14.0.0
What operating system are you using?
Windows
Operating System Version
Windows 10 Pro version 20H2, OS build 19042.1110
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
A transparent window should be transparent, no matter its height or width.
Actual Behavior
BROKEN
GIVEN your window is transparent, frameless, and you are running on windows
AND your window's width === monitor width and the window's height === monitor height
AND its top left corner is the top left corner of your monitor
THEN your transparent window will be white and render nothing
GIVEN prereqs above
AND your window's width === monitor width - 1 and the window's height === monitor height
AND its top left corner is the top left corner of your monitor
THEN your transparent window will be white and render nothing
GIVEN prereqs above
AND your window's width === monitor width and the window's height === monitor height
AND its top left corner is the top left corner of your monitor
THEN your transparent window will be white and render nothing
WORKS
GIVEN prereqs above
AND your window's width === monitor width and the window's height === monitor height
AND its top left corner is the top left corner of your monitor + 1 px in the X or Y direction
THEN your transparent window will be transparent and perfect
GIVEN prereqs above
AND your window's width === monitor width - 1 and the window's height === monitor height - 1
AND its top left corner is the top left corner of your monitor
THEN your transparent window will be transparent and perfect
Testcase Gist URL
https://gist.github.com/d52ceca16461bfe12b2bf936bc462412
Additional Information
If you shift the top left corner of the window by 1 pixel, the bug goes away. I assume there's a falsey check somewhere and 0 is triggering it. I didn't test this on a secondary monitor.
The text was updated successfully, but these errors were encountered: