Fix frameless windows with vibrancy#11886
Conversation
108e862 to
cede986
Compare
There was a problem hiding this comment.
This is only called from within the class. Seems like it could be moved to inside the protected block?
| impl->SetBackgroundOpaque(opaque); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
This is a pretty egregious demeter violation but I'm not sure what the Right Thing is here since some of these conditionals are for upstream classes out of our control 🤔
There was a problem hiding this comment.
Yeah, I tried to collapse it as much as I could but everything is just consecutive potentially nullptr values 🤔
There was a problem hiding this comment.
I inverted the logic to collapse it a bit 👍
There was a problem hiding this comment.
Still like 4 steps of separation though so idk 🤔
| NSRect original_frame_; | ||
| NSUInteger simple_fullscreen_mask_; | ||
|
|
||
| NSColor* background_color_before_vibrancy_ = nil; |
There was a problem hiding this comment.
I'm not positive but should this be a base::scoped_nsobject<NSColor>?
cede986 to
cd31f8f
Compare
|
@ckerr Updated 👍 |
cd31f8f to
636f0dd
Compare
|
@codebytere when do you think this will be released? |
|
@sallar it's on the table for 2.0, i believe, so fairly soon |
|
not include in 2.0 beta1? |
|
@HuChundong It should be, do you have a case where it's not working? |
|
@MarshallOfSound this main window still lose round corner in high sierra 10.13.3 |
|
This PR was not intended to fix the round / square corner issue. There is a separate open issue for that |
|
Hi, I don't know what I am doing wrong but this is still not working for me... running MacOS 10.13.3. I still get the same error of the transparent bar showing up. |
|
@huangruichang @tcaer Remove |
|
@sallar Maybe I am not the person you wanna notice 🤣 |
|
@sallar No luck... I get the square corners and the invisible tab :/ |
|
@tcaer Can you share repro? |
|
@tcaer add Judging by your comments this PR fixes nothing. |
|
I just tested beta1. This fix changes nothing. Vibrancy+Square Corners was also possible before (using But judging by @MarshallOfSound's comment, there is a separate issue for the rounded corners... #10886 |
|
Also just tested and unfortunately I'm also seeing much worse behavior than before the fix. Previously there was just a transparent area where the titlebar would normally be – now it's showing corrupted artifacts and the titlebar has reverted to the standard thickness / position even with |
|
@tommoor Super weird, let me test this real quick 🤔 |
|
@tommoor Two quick things
|
|
Oh, interesting I did check the release notes for breaking changes and there wasn't a mention of that property being deprecated but that would explain the first part of the issue 😄. I wonder if having the deprecated option there caused it. Was the deprecation removed in 2.0? If so I guess we should add that to the notes. The screenshot doesn't capture it too well, basically the entire titlebar is showing artifacts depending on what's behind - It mostly looks black / transparent. Options are: |
|
Thanks @MarshallOfSound – I'm out for the day now, but I'll try with 2.0 again tomorrow and the correct hiddenInset option, hopefully that does the trick 👍 |
|
@tommoor It might also be the |
|
Maybe, I can't really use those options as the square corners are unacceptable on macOS unfortunately 😞 |
|
Hm, fair enough, we had an issue somewhere for the square corner thing. Will try take a look at that later this week if I get a chance. |
|
Thanks so much for all the help! |
|
@tcaer Known bug and I think it's already fixed 😆 |
|
Hey guys, thanks so much for fixing this! Does this fix the corner radius bug too? In my build, the top two corners aren't rounded when I use the following settings with a webview in it #10522: |






Fixes #10521
Tested with
setVibrancyas well so this supports dynamically switching vibrancy still as well.