-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Improve transparency on macOS #7965
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog entry.
I'm seeing the same thing I observed in the discussion of #7928: No borders and a white title bar even though
|
The end window opacity is not as it should be, it's just generally more opaque compared to what it was before or glitches. |
Window has opaque title bar and real border when config.window_opacity == 1.
We set the transparency explicitly using `Window::set_transparent` further below, so this is no longer needed on macOS after: rust-windowing/winit#3657
235bfe7
to
39eb966
Compare
I've updated the PR and reverted some of the changes I probably mistakenly thought were for the better, though I'm too unsure of what the desired behaviour is (I don't like transparent windows myself, and don't use Alacritty). The first two commits should bring Alacritty back in line with what it was pre winit 0.30. Would be happy if someone else would take over for the rest. |
I should be able to finish testing and implementing this PR, though my macOS API knowledge is limited and it may take me a little while to get around to everything. Right now it seems the main things that need changing are with respect to the titlebar and fixing whatever is causing #7969. At first I didn't notice that issue myself, but now transparency is broken for me as well. I assume the best way to do this would be to make a new PR with the current state of this one and push to that myself as I make progress? |
Probably easiest this way, yes. |
So after catching up on this issue, it seems like rust-windowing/winit#3722 fixes the main issue (#7969), so what's left is to figure out what we actually want, if anything. I'm unsure that having a transparent titlebar is the right default because it can be achieved with I also don't know if it's better to have drop shadows or not with a transparent background. My instinct would be to have them, but given that we don't have them already, I'm fine leaving it as is. Looking back at #7928, it seems like everything there has been addressed. Here's a screenshot of an alacritty window ( and here's one without Yes the transparent window's titlebar is a less dark color, but I don't see the red bleeding into it like it appears to be in the original PR and I believe this behavior looks reasonable. |
I'll note another option: Use |
Extension upon #7928, see that for discussion. I've improved a bit on the window background, by setting the alpha channel to follow the window opacity.
When
window.opacity < 1
, we do two things: