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

Transparent windows are completely broken on Windows 11 #2082

Closed
parasyte opened this issue Dec 3, 2021 · 4 comments
Closed

Transparent windows are completely broken on Windows 11 #2082

parasyte opened this issue Dec 3, 2021 · 4 comments
Labels
B - bug Dang, that shouldn't have happened DS - windows

Comments

@parasyte
Copy link

parasyte commented Dec 3, 2021

Running the transparent example on Windows 11 (version 21H2, build 22000.348) appears to completely crash something in the OS. My screens flash black for a moment, and all windows appear as just the decoration with empty contents for a second until things settle down. This looks pretty similar to what happens when you update the display drivers, except window positions are not reset (because the driver update temporarily changes the desktop resolution).

Whatever crashes also disables Night Light; I have to re-enable it manually in Settings > System > Display. Working on this bug in the middle of the night is really unkind to my eyesight.

git bisect points at #1933 as causing the crash.

The transparent window itself is completely invisible, but it still receives events. I am not sure if this example is supposed to behave this way. It acts the same with 0.25.0 on Windows 11. I don't think it's supposed to do this, considering #1933 (comment) shows a video with this example creating an actual window. Something I don't get at all.

@parasyte
Copy link
Author

parasyte commented Dec 3, 2021

Here's some more info with screenshots to help illustrate the issues.

0.26.0 and 0.25.0 both show the same completely invisible window behavior. Here's what it looks like with 0.25.0 specifically. I'm hovering over the window in the taskbar to bring up the little invisible window preview:

winit-transparent-0 25 0

And if I run the same example in 0.24.0, I do see something resembling a transparent window:

winit-transparent-0 24 0

🤷


One more datapoint: egui_demo_app (which uses winit 0.25.0) properly shows a transparent background on Windows 11. In the linked egui PR, I commented with_transparent(true) to work around the crash. When that is enabled, I get the crash and the window background is not transparent, suggesting that transparent windows are in fact not at all working in 0.26.0 on Windows 11.

parasyte added a commit to parasyte/egui that referenced this issue Dec 3, 2021
- This has some obvious issues at the moment. First, transparent windows
  are completely broken on Windows 11. See: rust-windowing/winit#2082
  So I've completely disabled that feature for now.
- Secondly, `glium` needs an update. I'm patching it with an unreleased
  git revision to make sure things are working together.
@msiglreith msiglreith added DS - windows B - bug Dang, that shouldn't have happened labels Dec 3, 2021
@msiglreith
Copy link
Member

Thanks for the report - checked on Windows 10 and seems to work fine there. Unfortunately, I don't have a Win11 compatible system so I currently can't looks further into this.

@msiglreith
Copy link
Member

Should be fixed by #2121

@parasyte
Copy link
Author

parasyte commented Jan 3, 2022

Confirmed!

@parasyte parasyte closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - windows
Development

No branches or pull requests

2 participants